code: def single_proc_run(
      local_rank, fun, main_port, cfg_state, world_size
  ):
      """Executes fun() on a single GPU in a multi-GPU setup."""
      os.environ["MASTER_ADDR"] = "localhost"
      os.environ["MASTER_PORT"] = str(main_port)
      os.environ["RANK"] = str(local_rank)
      os.environ["LOCAL_RANK"] = str(local_rank)
      os.environ["WORLD_SIZE"] = str(world_size)
      setup_distributed(cfg_state)
      fun()
  
file_path: pycls/pycls/core/distributed.py
imports: import os
  import random
  import submitit
  import torch
  from pycls.core.config import cfg
label_desc: Use image node_id 4 for calling a global function with example usage: single_proc_run(local_rank, fun, main_port, cfg_state, world_size) without return types