<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _save_env(env):
 """Saves one environment. Args: env (dict):
 the env dict to save. """

    env_path = os.path.join(env["resultdir"], "env")

    if os.path.isdir(env["resultdir"]):
        with open(env_path, "w") as f:
            yaml.dump(env, f)