yt.funcs.
rootonly
This is a decorator that, when used, will only call the function on the root processor and then broadcast the results of the function to all other processors.
This can be used like so:
@rootonly def some_root_only_function(...):