code: def test_failed_task_runtime_env_setup(shutdown_only):
      @ray.remote
      def f():
          pass
  
      bad_env = RuntimeEnv(
          conda={"dependencies": ["_this_does_not_exist"]}
      )
      with pytest.raises(
          RuntimeEnvSetupError,
      ):
          ray.get(
              f.options(
                  runtime_env=bad_env, name="task-runtime-env-failed"
              ).remote()
          )
  
      wait_for_condition(
          verify_failed_task,
          name="task-runtime-env-failed",
          error_type="RUNTIME_ENV_SETUP_FAILED",
          error_message="ResolvePackageNotFound",
      )
  
imports: from collections import defaultdict
  from typing import Dict
  import os
  import pytest
  import sys
  import threading
  import time
  from ray._private.state_api_test_utils import verify_failed_task
  from ray.exceptions import RuntimeEnvSetupError
  from ray.runtime_env import RuntimeEnv
  import ray
  from ray.util.state.common import ListApiOptions, StateResource
  from ray._private.test_utils import raw_metrics, run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition
  from ray.util.state import StateApiClient, list_tasks
  from ray._private.worker import RayContext
label_desc: Use image node_id 6 for calling a global function with example usage: test_failed_task_runtime_env_setup(shutdown_only) without return types