code: def test_runtime_env_cache_with_pip_check(start_cluster):
      # moto require requests>=2.5
      conflict_packages = ["moto==3.0.5", "requests==2.4.0"]
      runtime_env = {
          "pip": {
              "packages": conflict_packages,
              "pip_version": "==20.2.3",
              "pip_check": False,
          }
      }
  
      @ray.remote
      def f():
          return True
  
      assert ray.get(f.options(runtime_env=runtime_env).remote())
  
      runtime_env["pip"]["pip_version"] = "==21.3.1"
      # Just modify filed pip_version, but this time,
      # not hit cache and raise an exception
      with pytest.raises(ray.exceptions.RuntimeEnvSetupError) as error:
          ray.get(f.options(runtime_env=runtime_env).remote())
  
      assert "The conflict is caused by:" in str(error.value)
      assert "The user requested requests==2.4.0" in str(error.value)
      assert "moto 3.0.5 depends on requests>=2.5" in str(error.value)
  
      runtime_env["pip"]["pip_check"] = True
      runtime_env["pip"]["pip_version"] = "==20.2.3"
      # Just modify filed pip_check, but this time,
      # not hit cache and raise an exception
      with pytest.raises(ray.exceptions.RuntimeEnvSetupError) as error:
          ray.get(f.options(runtime_env=runtime_env).remote())
  
imports: import sys
  import pytest
  from packaging.version import parse
  import ray
label_desc: Use image node_id 3 for calling a global function with example usage: test_runtime_env_cache_with_pip_check(start_cluster) and returns: True