code: def test_pip_requirements_files(tmpdir: str):
      """Test requirements.txt with tasks and actors.
  
      Test specifying in @ray.remote decorator and in .options.
      """
      pip_file_18 = Path(os.path.join(tmpdir, "runtime_env_pip_18.txt"))
      pip_file_18.write_text("requests==2.18.0")
      env_18 = {"pip": str(pip_file_18)}
  
      pip_file_16 = Path(os.path.join(tmpdir, "runtime_env_pip_16.txt"))
      pip_file_16.write_text("requests==2.16.0")
      env_16 = {"pip": str(pip_file_16)}
  
      @ray.remote(runtime_env=env_16)
      def get_version():
          import requests
  
          return requests.__version__
  
      # TODO(architkulkarni): Uncomment after #19002 is fixed
      # assert ray.get(get_version.remote()) == "2.16.0"
      assert (
          ray.get(get_version.options(runtime_env=env_18).remote())
          == "2.18.0"
      )
  
      @ray.remote(runtime_env=env_18)
      class VersionActor:
          def get_version(self):
              import requests
  
              return requests.__version__
  
      # TODO(architkulkarni): Uncomment after #19002 is fixed
      # actor_18 = VersionActor.remote()
      # assert ray.get(actor_18.get_version.remote()) == "2.18.0"
  
      actor_16 = VersionActor.options(runtime_env=env_16).remote()
      assert ray.get(actor_16.get_version.remote()) == "2.16.0"
  
file_path: ray/release/runtime_env_tests/workloads/rte_ray_client.py
imports: import argparse
  import json
  import os
  import tempfile
  import time
  from pathlib import Path
  import ray
label_desc: Use image node_id 1 for calling a global function with example usage: test_pip_requirements_files(tmpdir) and returns: requests, requests