code: def conda_env(env_name):
      # Set env name for shell script
      os.environ["JOB_COMPATIBILITY_TEST_TEMP_ENV"] = env_name
      # Delete conda env if it already exists
      try:
          yield
      finally:
          # Clean up created conda env upon test exit to prevent leaking
          del os.environ["JOB_COMPATIBILITY_TEST_TEMP_ENV"]
          subprocess.run(
              f"conda env remove -y --name {env_name}",
              shell=True,
              stdout=subprocess.PIPE,
          )
  
file_path: ray/python/ray/dashboard/modules/job/tests/test_backwards_compatibility.py
imports: import logging
  import pytest
  import sys
  import os
  import subprocess
  import uuid
  from contextlib import contextmanager
  from ray.job_submission import JobSubmissionClient, JobStatus
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 1 for calling a global function with example usage: conda_env(env_name) without return types