code: def test_kill_pending_actor_with_no_restart_true():
      cluster = ray.init()
      global_state_accessor = make_global_state_accessor(cluster)
  
      @ray.remote(resources={"WORKER": 1.0})
      class PendingActor:
          pass
  
      # Kill actor with `no_restart=True`.
      actor = PendingActor.remote()
      # TODO(ffbin): The raylet doesn't guarantee the order when dealing with
      # RequestWorkerLease and CancelWorkerLease. If we kill the actor
      # immediately after creating the actor, we may not be able to clean up
      # the request cached by the raylet.
      # See https://github.com/ray-project/ray/issues/13545 for details.
      time.sleep(1)
      ray.kill(actor, no_restart=True)
  
      def condition1():
          message = global_state_accessor.get_all_resource_usage()
          resource_usages = gcs_utils.ResourceUsageBatchData.FromString(
              message
          )
          if (
              len(
                  resource_usages.resource_load_by_shape.resource_demands
              )
              == 0
          ):
              return True
          return False
  
      # Actor is dead, so the infeasible task queue length is 0.
      wait_for_condition(condition1, timeout=10)
  
      global_state_accessor.disconnect()
      ray.shutdown()
  
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 29 for calling a global function with example usage: test_kill_pending_actor_with_no_restart_true() and returns: False, True