<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def archive_dir(env_dir):
 """ Compresses the directory and writes to its parent Parameters env_dir : str Returns ------- str """

    output_filename = env_dir + ".zip"
    log.info("Archiving conda environment: %s -> %s", env_dir, output_filename)
    subprocess.check_call(["zip", "-r", "-0", "-q", output_filename, env_dir])
    return output_filename