code: def test_unexpected_field_warning(shutdown_only):
      """Test that an unexpected runtime_env field doesn't error."""
      ray.init(runtime_env={"unexpected_field": "value"})
  
      @ray.remote
      def f():
          return True
  
      # Run a task to trigger runtime_env creation.
      assert ray.get(f.remote())
  
      # Check that the warning is logged.
      session_dir = ray._private.worker.global_worker.node.address_info[
          "session_dir"
      ]
      log_path = Path(session_dir) / "logs"
  
      # Check that a warning appears in some "runtime_env_setup*.log"
      wait_for_condition(
          lambda: any(
              "unexpected_field is not recognized" in open(f).read()
              for f in log_path.glob("runtime_env_setup*.log")
          )
      )
  
imports: import asyncio
  import logging
  import os
  from pathlib import Path
  import time
  from unittest import mock
  import tempfile
  import json
  from typing import List
  import pytest
  import ray
  from ray._private.runtime_env.context import RuntimeEnvContext
  from ray._private.runtime_env.plugin import RuntimeEnvPlugin
  from ray._private.test_utils import enable_external_redis, wait_for_condition
  from ray.exceptions import RuntimeEnvSetupError
  from ray.runtime_env.runtime_env import RuntimeEnv
label_desc: Use image node_id 5 for calling a global function with example usage: test_unexpected_field_warning(shutdown_only) and returns: True