code: def log_to_stderr(level=None):
      """
      Turn on logging and add a handler which prints to stderr
      """
      global _log_to_stderr
      import logging
  
      logger = get_logger()
      formatter = logging.Formatter(DEFAULT_LOGGING_FORMAT)
      handler = logging.StreamHandler()
      handler.setFormatter(formatter)
      logger.addHandler(handler)
  
      if level:
          logger.setLevel(level)
      _log_to_stderr = True
      return _logger
  
imports: import os
  import itertools
  import sys
  import weakref
  import atexit
  import threading
  from subprocess import _args_from_interpreter_flags
  from .None import process
label_desc: Use image node_id 6 for calling a global function with example usage: log_to_stderr(level) and returns: _logger