code: def test_override_failure(shutdown_only):
      """Tests invalid override behaviors."""
      ray.init()
  
      with pytest.raises(ValueError):
  
          @ray.remote(runtime_env={"working_dir": "."})
          def f():
              pass
  
      @ray.remote
      def g():
          pass
  
      with pytest.raises(ValueError):
          g.options(runtime_env={"working_dir": "."})
  
      with pytest.raises(ValueError):
  
          @ray.remote(runtime_env={"working_dir": "."})
          class A:
              pass
  
      @ray.remote
      class B:
          pass
  
      with pytest.raises(ValueError):
          B.options(runtime_env={"working_dir": "."})
  
imports: import os
  import shutil
  import sys
  import tempfile
  import time
  from importlib import import_module
  from pathlib import Path
  from unittest import mock
  import pytest
  import ray
  from ray._private import gcs_utils
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.packaging import get_uri_for_directory, upload_package_if_needed
  from ray._private.runtime_env.working_dir import WorkingDirPlugin, set_pythonpath_in_context
  from ray._private.utils import get_directory_size_bytes
label_desc: Use image node_id 8 for calling a global function with example usage: test_override_failure(shutdown_only) without return types