def _parse_config_to_dict(config_parser):
    """Returns a dictionary containing config section names as the key and
    a dictionary of config item names and config item values as the value.
    e.g. config['section_name']['item_name'] provides the item_value.
    """
    config = {}
    for section in config_parser.sections():
        config[section] = dict(config_parser.items(section))
    return config