code: def spawn_and_init(fn, world_size, args=None):
      if args is None:
          args = ()
      with tempfile.NamedTemporaryFile(delete=False) as tmp_file:
          torch.multiprocessing.spawn(
              fn=functools.partial(init_and_run, fn, args),
              args=(
                  world_size,
                  tmp_file.name,
              ),
              nprocs=world_size,
              join=True,
          )
  
imports: import functools
  import tempfile
  import torch
label_desc: Use image node_id 1 for calling a global function with example usage: spawn_and_init(fn, world_size, args) without return types