def configs_to_dict(configs):
    """
    Converts a config parser object into a dictionary.

    :param configs:
        The config parser instance to convert into a dictionary.
    :return:
        A dictionary representation of the config parser.
    """
    out = {}
    for section in configs.sections():
        out[section] = dict(configs.items(section))
    return out
