code: def test_failure_during_dependency_resolution(ray_start_regular):
      @ray.remote
      class Actor:
          def dep(self):
              while True:
                  time.sleep(1)
  
          def foo(self, x):
              return x
  
      @ray.remote
      def foo():
          time.sleep(3)
          return 1
  
      a = Actor.remote()
      # Check that the actor is alive.
      ray.get(a.foo.remote(1))
  
      ray.kill(a, no_restart=False)
      dep = a.dep.remote()
      ref = a.foo.remote(dep)
      with pytest.raises(ray.exceptions.RayActorError):
          ray.get(ref)
  
imports: import atexit
  import asyncio
  import collections
  import numpy
  import os
  import pytest
  import signal
  import sys
  import time
  import ray
  from ray.actor import exit_actor
  import ray.cluster_utils
  from ray._private.test_utils import wait_for_condition, wait_for_pid_to_exit, generate_system_config_map, SignalActor
label_desc: Use image node_id 17 for calling a global function with example usage: test_failure_during_dependency_resolution(ray_start_regular) and returns: int, x