def convert_vars_to_dict(env_vars):
    """
    Take a dict of processed env variables, and convert them to a python
    dictionary
    """
    ret = {}
    for name, value in env_vars.items():
        if '__' in name:
            section, option = name.split('__')
            if section not in ret:
                ret[section] = {}
            ret[section][option] = value
    return ret
