code: def test_get_actor_after_killed(shutdown_only):
      ray.init(num_cpus=2)
  
      @ray.remote
      class A:
          def ready(self):
              return True
  
      actor = A.options(
          name="actor", namespace="namespace", lifetime="detached"
      ).remote()
      ray.kill(actor)
      with pytest.raises(ValueError):
          ray.get_actor("actor", namespace="namespace")
  
      actor = A.options(
          name="actor_2",
          namespace="namespace",
          lifetime="detached",
          max_restarts=1,
          max_task_retries=-1,
      ).remote()
      ray.kill(actor, no_restart=False)
      assert ray.get(
          ray.get_actor("actor_2", namespace="namespace").ready.remote()
      )
  
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 33 for calling a global function with example usage: test_get_actor_after_killed(shutdown_only) and returns: True