Executes a function on each label in a given graph. Calls for unrelated node labels are executed in parallel.