def store_env(path=None):
path = path or get_store_env_tmp()<EOL>env_dict = yaml.safe_dump(os.environ.data, default_flow_style=False)<EOL>with open(path, '<STR_LIT:w>') as f:<EOL><INDENT>f.write(env_dict)<EOL><DEDENT>return path<EOL>
Encode current environment as yaml and store in path or a temporary
    file. Return the path to the stored environment.