code: def __init__(
      self,
      fun,
      args=None,
      kwargs=None,
      nice_level=0,
      child_on_start=None,
      child_on_exit=None,
  ):
      if args is None:
          args = []
      if kwargs is None:
          kwargs = {}
      self.fun = fun
      self.args = args
      self.kwargs = kwargs
      self.tempdir = tempdir = py.path.local.mkdtemp()
      self.RETVAL = tempdir.ensure("retval")
      self.STDOUT = tempdir.ensure("stdout")
      self.STDERR = tempdir.ensure("stderr")
  
      pid = os.fork()
      if pid:  # in parent process
          self.pid = pid
      else:  # in child process
          self.pid = None
          self._child(nice_level, child_on_start, child_on_exit)
  
file_path: catboost/contrib/python/py/py2/py/_process/forkedfunc.py
imports: import py
  import os
  import sys
  import marshal
label_desc: Use image node_id 1 to create a new ForkedFunc object  with example: obj = ForkedFunc(fun, args, kwargs, nice_level, child_on_start, child_on_exit)