code: def test_file_deleted_when_driver_exits(tmp_path, shutdown_only):
      temp_folder = tmp_path / "spill"
      temp_folder.mkdir()
  
      driver = """
  import json
  import os
  import signal
  import numpy as np
  import ray
  ray.init(
      object_store_memory=75 * 1024 * 1024,
      _system_config={{
          "max_io_workers": 2,
          "min_spilling_size": 0,
          "automatic_object_spilling_enabled": True,
          "object_store_full_delay_ms": 100,
          "object_spilling_config": json.dumps({{
              "type": "filesystem",
              "params": {{
                  "directory_path": "{temp_dir}"
              }}
          }}),
      }})
  arr = np.random.rand(1024 * 1024)  # 8 MB data
  replay_buffer = []
  # Spill lots of objects
  for _ in range(30):
      ref = None
      while ref is None:
          ref = ray.put(arr)
          replay_buffer.append(ref)
  # Send sigterm to itself.
  signum = {signum}
  sig = None
  if signum == 2:
      sig = signal.SIGINT
  elif signum == 15:
      sig = signal.SIGTERM
  os.kill(os.getpid(), sig)
  """
  
      # Run a driver with sigint.
      print("Sending sigint...")
      with pytest.raises(subprocess.CalledProcessError):
          print(
              run_string_as_driver(
                  driver.format(temp_dir=str(temp_folder), signum=2)
              )
          )
      wait_for_condition(
          lambda: is_dir_empty(temp_folder, append_path="")
      )
  
imports: import os
  import platform
  import random
  import subprocess
  import sys
  import tempfile
  import numpy
  import pytest
  import ray
  from ray._private.test_utils import run_string_as_driver, wait_for_condition
  from ray.tests.test_object_spilling import assert_no_thrashing, is_dir_empty
  from ray._private.external_storage import FileSystemStorage, ExternalStorageRayStorageImpl
label_desc: Use image node_id 9 for calling a global function with example usage: test_file_deleted_when_driver_exits(tmp_path, shutdown_only) without return types