code: def __init__(
      self,
      console: rich.console.Console,
      parties: List[str] = None,
      federation_session_id: str = None,
      data_dir: str = None,
      log_level: str = None,
  ):
      namespace = Namespace()
      if federation_session_id is not None:
          namespace.federation_session_id = federation_session_id
      if parties is not None:
          namespace.parties = parties
      if data_dir is not None:
          namespace.data_dir = data_dir
      if log_level is not None:
          namespace.log_level = log_level
      args = HfArgumentParser(LauncherArguments).parse_known_args(
          namespace=namespace
      )[0]
  
      multiprocessing.set_start_method("spawn")
      self.world_size = len(args.parties)
      self.processes: List[multiprocessing.Process] = []
      self.output_or_exception_q = Queue()
      self.safe_to_exit = Event()  # barrier
      self.console = console
      self._exception_tb = {}
      self.federation_session_id = args.federation_session_id
  
imports: import datetime
  import logging
  import multiprocessing
  import signal
  import sys
  import time
  import uuid
  from argparse import Namespace
  from dataclasses import dataclass, field
  from multiprocessing import Queue, Event
  from typing import List
  import rich
  import rich.console
  import rich.panel
  import rich.traceback
  from fate.arch import trace
  from .argparser import HfArgumentParser
label_desc: Use image node_id 1 to create a new MultiProcessLauncher object  with example: obj = MultiProcessLauncher(console, parties, federation_session_id, data_dir, log_level)