code: def test_directory():
      with tempfile.TemporaryDirectory() as tmp_dir:
          path = Path(tmp_dir)
          subdir = path / "subdir"
          subdir.mkdir(parents=True)
          requirements_file = subdir / "requirements.txt"
          with requirements_file.open(mode="w") as f:
              print("\n".join(PIP_LIST), file=f)
  
          good_conda_file = subdir / "good_conda_env.yaml"
          with good_conda_file.open(mode="w") as f:
              yaml.dump(CONDA_DICT, f)
  
          bad_conda_file = subdir / "bad_conda_env.yaml"
          with bad_conda_file.open(mode="w") as f:
              print("% this is not a YAML file %", file=f)
  
          old_dir = os.getcwd()
          os.chdir(tmp_dir)
          yield subdir, requirements_file, good_conda_file, bad_conda_file
          os.chdir(old_dir)
  
imports: import os
  import pytest
  import sys
  import tempfile
  from pathlib import Path
  from ray import job_config
  import yaml
  import jsonschema
  from ray._private.runtime_env.validation import parse_and_validate_excludes, parse_and_validate_working_dir, parse_and_validate_conda, parse_and_validate_pip, parse_and_validate_env_vars, parse_and_validate_py_modules
  from ray._private.runtime_env.plugin_schema_manager import RuntimeEnvPluginSchemaManager
  from ray.runtime_env import RuntimeEnv
label_desc: Use image node_id 1 for calling a global function with example usage: test_directory() without return types