code: def test_dying_driver_wait(ray_start_regular):
      # Start the Ray processes.
      address_info = ray_start_regular
  
      @ray.remote
      def sleep_forever():
          time.sleep(10**6)
  
      x_id = sleep_forever.remote()
  
      driver = """
  import ray
  ray.init("{}")
  ray.wait([ray.ObjectRef(ray._private.utils.hex_to_binary("{}"))])
  """.format(
          address_info["address"], x_id.hex()
      )
  
      p = run_string_as_driver_nonblocking(driver)
      # Make sure the driver is running.
      time.sleep(1)
      assert p.poll() is None
  
      # Kill the driver process.
      p.kill()
      p.wait()
      time.sleep(0.1)
  
      # Make sure the original task hasn't finished.
      ready_ids, _ = ray.wait([x_id], timeout=0)
      assert len(ready_ids) == 0
      # Seal the object so the store attempts to notify the worker that the
      # wait can return.
      obj = np.ones(200 * 1024, dtype=np.uint8)
      ray._private.worker.global_worker.put_object(obj, x_id)
      time.sleep(0.1)
  
      # Make sure that nothing has died.
      assert ray._private.services.remaining_processes_alive()
  
file_path: ray/python/ray/tests/test_component_failures.py
imports: import os
  import signal
  import sys
  import time
  import numpy
  import pytest
  import ray
  from ray._private.test_utils import SignalActor, run_string_as_driver_nonblocking
label_desc: Use image node_id 4 for calling a global function with example usage: test_dying_driver_wait(ray_start_regular) without return types