code: def spawn_prepare(fd):
      from_parent_r = os.fdopen(fd, "rb", closefd=False)
      preparation_data = reduction.pickle.load(from_parent_r)
  
      try:
          _config = preparation_data["fiber_config"]
          init_fiber(preparation_data["name"], **vars(_config))
  
          multiprocessing.spawn.prepare(preparation_data)
          self = reduction.pickle.load(from_parent_r)
          post_data = reduction.pickle.load(from_parent_r)
  
      except Exception as e:
          print("error", str(e))
          raise e
  
      # start watching thread so that when master quits, worker also quits
      td = threading.Thread(
          target=exit_on_fd_close, args=(fd,), daemon=True
      )
      logger.debug("Starting monitoring thread")
      td.start()
  
      self.ident = post_data["pid"]
      exitcode, err = self._bootstrap()
      if err:
          print("Exception in {}:".format(self))
          print(err)
          return exitcode
  
      return exitcode
  
file_path: fiber/fiber/spawn.py
imports: import os
  import logging
  from multiprocessing import reduction
  import multiprocessing
  import threading
  import traceback
  import select
  import signal
  import time
  from fiber.init import init_fiber
label_desc: Use image node_id 3 for calling a global function with example usage: spawn_prepare(fd) and returns: exitcode, exitcode