code: def test_spill_logs():
      script = """
  import ray
  
  ray.init(object_store_memory=200e6)
  
  x = []
  
  for _ in range(10):
      x.append(ray.put(bytes(100 * 1024 * 1024)))
  """
  
      proc = run_string_as_driver_nonblocking(
          script, env={"RAY_verbose_spill_logs": "1"}
      )
      out_str = proc.stdout.read().decode(
          "ascii"
      ) + proc.stderr.read().decode("ascii")
      print(out_str)
      assert "Spilled " in out_str
  
      proc = run_string_as_driver_nonblocking(
          script, env={"RAY_verbose_spill_logs": "0"}
      )
      out_str = proc.stdout.read().decode(
          "ascii"
      ) + proc.stderr.read().decode("ascii")
      print(out_str)
      assert "Spilled " not in out_str
  
imports: import os
  import re
  import signal
  import subprocess
  import sys
  import time
  import pytest
  import ray
  from ray._private.test_utils import run_string_as_driver, run_string_as_driver_nonblocking, wait_for_condition
label_desc: Use image node_id 4 for calling a global function with example usage: test_spill_logs() without return types