human
Complete the below
def initLogging(verbose=False, console='stdout', consoleLevel='DEBUG'):

    ''''Initilize NuPic logging by reading in from the logging configuration file. The
    logging configuration file is named ``nupic-logging.conf`` and is expected to
    be in the format defined by the python logging module.
    If the environment variable ``NTA_CONF_PATH`` is defined, then the logging
    configuration file is expected to be in the ``NTA_CONF_PATH`` directory. If
    ``NTA_CONF_PATH`` is not defined, then it is found in the \'conf/default\'
    subdirectory of the NuPic installation directory (typically
    ~/nupic/current/conf/default)
    The logging configuration file can use the environment variable
    ``NTA_LOG_DIR`` to set the locations of log files. If this variable is not
    defined, logging to files will be disabled.
    :param console: Defines console output for the default "root" logging
    configuration.
this may be one of \'stdout\', \'stderr\', or None;
    Use None to suppress console logging output
    :param consoleLevel:
    Logging-level filter string for console output corresponding to
    logging levels in the logging module.
may be one of:
    \'DEBUG\', \'INFO\', \'WARNING\', \'ERROR\', or \'CRITICAL\'.
    E.g.,  a value of\'WARNING\' suppresses DEBUG and INFO level output
    to console, but allows WARNING, ERROR, and CRITICAL'
    '''
assistant
#Here is the Python program you requested.
    global gLoggingInitialized
    if gLoggingInitialized:
        if verbose:
            print >>sys.stderr, 'Logging    already    initialized,    doing    nothing.'
        return
    consoleStreamMappings = {'stdout': 'stdoutConsoleHandler', 'stderr': 'stderrConsoleHandler'}
    consoleLogLevels = ['DEBUG', 'INFO', 'WARNING', 'WARN', 'ERROR', 'CRITICAL', 'FATAL']
    assert ((console is None) or (console in consoleStreamMappings.keys())), ('Unexpected    console    arg    value:    %r' % (console,))
    assert (consoleLevel in consoleLogLevels), ('Unexpected    consoleLevel    arg    value:    %r' % consoleLevel)
    configFilename = 'nupic-logging.conf'
    configFilePath = resource_filename('nupic.support', configFilename)
    configLogDir = os.environ.get('NTA_LOG_DIR', None)
    if verbose:
        print >>sys.stderr, ('Using    logging    configuration    file:    %s' % configFilePath)
    replacements = dict()
    def makeKey(name):
        '    Makes    replacement    key    '
        return ('$$%s$$' % name)
    platform = sys.platform.lower()
    if platform.startswith('java'):
        import java.lang
        platform = java.lang.System.getProperty('os.name').lower()
        if platform.startswith('mac    os    x'):
            platform = 'darwin'
    if platform.startswith('darwin'):
        replacements[makeKey('SYSLOG_HANDLER_ADDRESS')] = '"/var/run/syslog"'
    elif platform.startswith('linux'):
        replacements[makeKey('SYSLOG_HANDLER_ADDRESS')] = '"/dev/log"'
    elif platform.startswith('win'):
        replacements[makeKey('SYSLOG_HANDLER_ADDRESS')] = '"log"'
    else:
        raise RuntimeError(('This    platform    is    neither    darwin,    win32,    nor    linux:    %s' % (sys.platform,)))
    replacements[makeKey('PERSISTENT_LOG_HANDLER')] = 'fileHandler'
    if platform.startswith('win'):
        replacements[makeKey('FILE_HANDLER_LOG_FILENAME')] = '"NUL"'
    else:
        replacements[makeKey('FILE_HANDLER_LOG_FILENAME')] = '"/dev/null"'
    handlers = list()
    if...