code: def init_root_logger():
      logger = get_root_logger()
      logger.propagate = False
      for handler in logger.handlers:
          logger.removeHandler(handler)
      logger.addHandler(logging.StreamHandler())
      level = os.environ.get(
          "COREMLTOOLS_OPTIMIZE_TORCH_LOG_LEVEL", "info"
      ).upper()
      logger.setLevel(level)
      set_logger_formatter(logger)
      return logger
  
file_path: coremltools/coremltools/optimize/torch/_logging.py
imports: import logging
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: init_root_logger() and returns: logger