code: def init_child(econtext, log_level, candidate_temp_dirs):
      
      # Copying the master's log level causes log messages to be filtered before
      # they reach LogForwarder, thus reducing an influx of tiny messges waking
      # the connection multiplexer process in the master.
      LOG.setLevel(log_level)
      logging.getLogger('ansible_mitogen').setLevel(log_level)
  
      # issue #536: if the json module is available, remove simplejson from the
      # importer whitelist to avoid confusing certain Ansible modules.
      if json.__name__ == 'json':
          econtext.importer.whitelist.remove('simplejson')
  
      global _fork_parent
      if FORK_SUPPORTED:
          mitogen.parent.upgrade_router(econtext)
          _fork_parent = econtext.router.fork()
  
      global good_temp_dir
      good_temp_dir = find_good_temp_dir(candidate_temp_dirs)
  
      return {
          u'fork_context': _fork_parent,
          u'home_dir': mitogen.core.to_text(os.path.expanduser('~')),
          u'good_temp_dir': good_temp_dir,
      }
docs: Called by ContextService immediately after connection; arranges for the
      (presently) spotless Python interpreter to be forked, where the newly
      forked interpreter becomes the parent of any newly forked future
      interpreters.
  
      This is necessary to prevent modules that are executed in-process from
      polluting the global interpreter state in a way that effects explicitly
      isolated modules.
  
      :param int log_level:
          Logging package level active in the master.
      :param list[str] candidate_temp_dirs:
          List of $variable-expanded and tilde-expanded directory names to add to
          candidate list of temporary directories.
  
      :returns:
          Dict like::
  
              {
                  'fork_context': mitogen.core.Context or None,
                  'good_temp_dir': ...
                  'home_dir': str
              }
  
          Where `fork_context` refers to the newly forked 'fork parent' context
          the controller will use to start forked jobs, and `home_dir` is the
          home directory for the active user account.