code: def zero_only():
      """
      Context manager that only runs the enclosed block on the main rank.
      """
      if is_main_process():
          yield
      else:
          yield None
  
file_path: axolotl/src/axolotl/utils/distributed.py
imports: import os
  import pickle
  from contextlib import contextmanager
  import torch
  import torch.distributed
  from accelerate import Accelerator
label_desc: Use image node_id 6 for calling a global function with example usage: zero_only() without return types