def restore_env(env_dict):
if hasattr(sys, '<STR_LIT>'):<EOL><INDENT>sys.prefix = sys.real_prefix<EOL>del(sys.real_prefix)<EOL><DEDENT>replace_osenviron(expand_envvars(dict_to_env(env_dict)))<EOL>
Set environment variables in the current python process from a dict
    containing envvars and values.