code: def _child(self, nice_level, child_on_start, child_on_exit):
      # right now we need to call a function, but first we need to
      # map all IO that might happen
      sys.stdout = stdout = get_unbuffered_io(1, self.STDOUT)
      sys.stderr = stderr = get_unbuffered_io(2, self.STDERR)
      retvalf = self.RETVAL.open("wb")
      EXITSTATUS = 0
      try:
          if nice_level:
              os.nice(nice_level)
          try:
              if child_on_start is not None:
                  child_on_start()
              retval = self.fun(*self.args, **self.kwargs)
              retvalf.write(marshal.dumps(retval))
              if child_on_exit is not None:
                  child_on_exit()
          except:
              excinfo = py.code.ExceptionInfo()
              stderr.write(str(excinfo._getreprcrash()))
              EXITSTATUS = self.EXITSTATUS_EXCEPTION
      finally:
          stdout.close()
          stderr.close()
          retvalf.close()
      os.close(1)
      os.close(2)
      os._exit(EXITSTATUS)
  
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 2 for calling the ForkedFunc obj's underlying member method code with example usage: obj._child(nice_level, child_on_start, child_on_exit) without return types