def add_environment_vars(config: MutableMapping[str, Any]):
<EOL>for e in os.environ:<EOL><INDENT>if re.match("<STR_LIT>", e):<EOL><INDENT>val = os.environ.get(e)<EOL>if val:<EOL><INDENT>e.replace("<STR_LIT>", "<STR_LIT>")<EOL>env_keys = e.lower().split("<STR_LIT>")<EOL>if len(env_keys) > <NUM_LIT:1>:<EOL><INDENT>joined = '<STR_LIT>'.join(env_keys)<EOL>eval_config = f'<STR_LIT>'<EOL>try:<EOL><INDENT>eval(eval_config)<EOL><DEDENT>except Exception as exc:<EOL><INDENT>log.warn("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>config[env_keys[<NUM_LIT:0>]] = val<EOL><DEDENT><DEDENT><DEDENT><DEDENT>
Override config with environment variables

    Environment variables have to be prefixed with BELBIO_
    which will be stripped before splitting on '__' and lower-casing
    the environment variable name that is left into keys for the
    config dictionary.

    Example:
        BELBIO_BEL_API__SERVERS__API_URL=http://api.bel.bio
        1. BELBIO_BEL_API__SERVERS__API_URL ==> BEL_API__SERVERS__API_URL
        2. BEL_API__SERVERS__API_URL ==> bel_api__servers__api_url
        3. bel_api__servers__api_url ==> [bel_api, servers, api_url]
        4. [bel_api, servers, api_url] ==> config['bel_api']['servers']['api_url'] = http://api.bel.bio