code: def test_node_killed(short_gcs_publish_timeout, ray_start_cluster):
      """Make sure all ray workers when nodes are dead."""
      cluster = ray_start_cluster
      # head node.
      cluster.add_node(
          num_cpus=0,
          _system_config={"gcs_rpc_server_reconnect_timeout_s": 1},
      )
      ray.init(address="auto")
  
      num_worker_nodes = 2
      workers = []
      for _ in range(num_worker_nodes):
          workers.append(cluster.add_node(num_cpus=2))
      cluster.wait_for_nodes()
  
      @ray.remote
      def f():
          import time
  
          time.sleep(100)
  
      num_cpus = int(ray.available_resources()["CPU"])
      tasks = [f.remote() for _ in range(num_cpus)]  # noqa
      wait_for_condition(
          lambda: len(get_all_ray_worker_processes()) > 0
      )
  
      for worker in workers:
          cluster.remove_node(worker)
  
      wait_for_condition(
          lambda: len(get_all_ray_worker_processes()) == 0,
          timeout=WAIT_TIMEOUT,
      )
  
imports: import sys
  import time
  import platform
  import os
  import signal
  import multiprocessing
  import pytest
  import ray
  import psutil
  from ray._private.test_utils import wait_for_condition, run_string_as_driver_nonblocking
  from ray.util.state import get_worker, list_tasks
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 9 for calling a global function with example usage: test_node_killed(short_gcs_publish_timeout, ray_start_cluster) without return types