code: def test_actor_worker_dying_future_tasks(
      ray_start_regular, error_pubsub
  ):
      p = error_pubsub
  
      @ray.remote(max_restarts=0)
      class Actor:
          def getpid(self):
              return os.getpid()
  
          def sleep(self):
              time.sleep(1)
  
      a = Actor.remote()
      pid = ray.get(a.getpid.remote())
      tasks1 = [a.sleep.remote() for _ in range(10)]
      os.kill(pid, 9)
      time.sleep(0.1)
      tasks2 = [a.sleep.remote() for _ in range(10)]
      for obj in tasks1 + tasks2:
          with pytest.raises(Exception):
              ray.get(obj)
  
      errors = get_error_message(
          p, 1, ray_constants.WORKER_DIED_PUSH_ERROR
      )
      assert len(errors) == 1
      assert errors[0]["type"] == ray_constants.WORKER_DIED_PUSH_ERROR
  
imports: import os
  import signal
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  import ray._private.ray_constants
  import ray._private.utils
  from ray._private.test_utils import SignalActor, convert_actor_state, get_error_message, init_error_pubsub, wait_for_condition
  from ray.exceptions import GetTimeoutError, RayActorError, RayTaskError
label_desc: Use image node_id 10 for calling a global function with example usage: test_actor_worker_dying_future_tasks(ray_start_regular, error_pubsub) and returns: os