code: def test_actor_init_fails(ray_start_cluster_head):
      cluster = ray_start_cluster_head
      remote_node = cluster.add_node()
  
      @ray.remote(max_restarts=1, max_task_retries=-1)
      class Counter:
          def __init__(self):
              self.x = 0
  
          def inc(self):
              self.x += 1
              return self.x
  
      # Create many actors. It should take a while to finish initializing them.
      actors = [Counter.remote() for _ in range(15)]
      # Allow some time to forward the actor creation tasks to the other node.
      time.sleep(0.1)
      # Kill the second node.
      cluster.remove_node(remote_node)
  
      # Get all of the results.
      results = ray.get([actor.inc.remote() for actor in actors])
      assert results == [1 for actor in actors]
  
imports: import os
  import sys
  import time
  import numpy
  import pytest
  import ray
  import ray._private.gcs_utils
  from ray.util.state import list_actors
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, convert_actor_state, kill_actor_and_wait_for_failure, make_global_state_accessor, run_string_as_driver, wait_for_condition, wait_for_pid_to_exit
  from ray._private.ray_constants import gcs_actor_scheduling_enabled
  from ray.experimental.internal_kv import _internal_kv_get, _internal_kv_put
label_desc: Use image node_id 7 for calling a global function with example usage: test_actor_init_fails(ray_start_cluster_head) and returns: self