code: def __init__(self, world_size, run_process_fn, fn_args=None):
      env = os.environ.copy()
      env["WORLD_SIZE"] = str(world_size)
      multiprocessing.set_start_method("spawn")
  
      # Use random file so multiple jobs can be run simultaneously
      INIT_METHOD = "file:///tmp/crypten-rendezvous-{}".format(
          uuid.uuid1()
      )
      env["RENDEZVOUS"] = INIT_METHOD
  
      self.processes = []
      for rank in range(world_size):
          process_name = "process " + str(rank)
          process = multiprocessing.Process(
              target=self.__class__._run_process,
              name=process_name,
              args=(rank, world_size, env, run_process_fn, fn_args),
          )
          self.processes.append(process)
  
      if crypten.mpc.ttp_required():
          ttp_process = multiprocessing.Process(
              target=self.__class__._run_process,
              name="TTP",
              args=(
                  world_size,
                  world_size,
                  env,
                  crypten.mpc.provider.TTPServer,
                  None,
              ),
          )
          self.processes.append(ttp_process)
  
file_path: CrypTen/pycon-workshop-2020/multiprocess_launcher.py
imports: import logging
  import multiprocessing
  import os
  import uuid
  import crypten
label_desc: Use image node_id 1 to create a new MultiProcessLauncher object  with example: obj = MultiProcessLauncher(world_size, run_process_fn, fn_args)