code: def getLoggerWithConsoleHandler(logger_name=None):
      
      logger = logging.getLogger(logger_name)
      logger.setLevel(logging.INFO)
      if not logger.handlers:
          handler = logging.StreamHandler(sys.stdout)
          if sys.platform == 'win32':
              formatter = logging.Formatter(
                              fmt="%(asctime)s %(name)s %(message)s",
                              datefmt='%H:%M:%S')
          else:
              formatter = ColorFormatter(fmt="$RESET %(asctime)s "
                                         "$BOLD$COLOR%(name)s$RESET "
                                         "%(message)s", datefmt='%H:%M:%S')
          handler.setFormatter(formatter)
          logger.addHandler(handler)
      return logger
docs: Gets a logger object with a pre-initialized console handler.