code: def _test_task_and_actor():
      @ray.remote
      def f():
          return 1
  
      with pytest.raises(
          RuntimeEnvSetupError, match="install virtualenv"
      ):
          ray.get(f.options(runtime_env={"pip": ["requests"]}).remote())
  
      @ray.remote
      class A:
          def task(self):
              return 1
  
      a = A.options(runtime_env={"pip": ["requests"]}).remote()
  
      with pytest.raises(
          RuntimeEnvSetupError, match="install virtualenv"
      ):
          ray.get(a.task.remote())
  
file_path: ray/python/ray/tests/test_runtime_env_ray_minimal.py
imports: import os
  import sys
  import pytest
  import ray
  from ray.exceptions import RuntimeEnvSetupError
label_desc: Use image node_id 1 for calling a global function with example usage: _test_task_and_actor() and returns: int, int