code: def launch(main_func, nprocs, args=()):
      port = _find_free_port()
      dist_url = f"tcp://127.0.0.1:{port}"
      # dist_url = "env://"
      mp.spawn(
          distributed_worker,
          nprocs=nprocs,
          args=(main_func, nprocs, dist_url, args),
          daemon=False,
      )
  
imports: import io
  import tempfile
  import unittest
  from contextlib import ExitStack
  import torch
  import torch.distributed
  import torch.multiprocessing
  from detectron2.utils import comm
  from densepose.evaluation.tensor_storage import SingleProcessFileTensorStorage, SingleProcessRamTensorStorage, SizeData, storage_gather
label_desc: Use image node_id 2 for calling a global function with example usage: launch(main_func, nprocs, args) without return types