code: def get(
      cls, file_path=None, level="INFO", colorize=True, track_code=False
  ):
      logging.setLoggerClass(cls)
      logger = logging.getLogger(cls.NAME)
      logging.setLoggerClass(logging.Logger)  # restore
      logger.setLevel(level)
  
      if logger.hasHandlers():
          # If logger already got all handlers (# handlers == 2), use the logger.
          # else, re-set handlers.
          if len(logger.handlers) == 2:
              return logger
  
          logger.handlers.clear()
  
      log_format = "%(levelname)s %(asctime)s | %(message)s"
      #  log_format = '%(asctime)s | %(message)s'
      if track_code:
          log_format = (
              "%(levelname)s::%(asctime)s | [%(filename)s] [%(funcName)s:%(lineno)d] "
              "%(message)s"
          )
      date_format = "%m/%d %H:%M:%S"
      if colorize:
          formatter = ColorFormatter(log_format, date_format)
      else:
          formatter = logging.Formatter(log_format, date_format)
  
      # standard output handler
      # NOTE as default, StreamHandler use stderr stream instead of stdout stream.
      # Use StreamHandler(sys.stdout) for stdout stream.
      stream_handler = logging.StreamHandler(sys.stdout)
      stream_handler.setFormatter(formatter)
      logger.addHandler(stream_handler)
  
      if file_path:
          # file output handler
          file_handler = logging.FileHandler(file_path)
          file_handler.setFormatter(formatter)
          logger.addHandler(file_handler)
  
      logger.propagate = False
  
      return logger
  
file_path: generalized-moe/domainbed/lib/logger.py
imports: import sys
  import logging
label_desc: Use image node_id 1 for calling the Logger obj's underlying member method code with example usage: obj.get(cls, file_path, level, colorize, track_code) and returns: logger, logger