code: def test_actor_worker_dying(ray_start_regular, error_pubsub):
      p = error_pubsub
  
      @ray.remote
      class Actor:
          def kill(self):
              eval("exit()")
  
      @ray.remote
      def consume(x):
          pass
  
      a = Actor.remote()
      [obj], _ = ray.wait([a.kill.remote()], timeout=5)
      with pytest.raises(ray.exceptions.RayActorError):
          ray.get(obj)
      with pytest.raises(ray.exceptions.RayTaskError):
          ray.get(consume.remote(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 9 for calling a global function with example usage: test_actor_worker_dying(ray_start_regular, error_pubsub) without return types