<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getLoggerWithConsoleHandler(logger_name=None):
 """ Gets a logger object with a pre-initialized console handler. """

    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