code: def test_detached_actor_local_mode(ray_start_regular):
      RETURN_VALUE = 3
  
      @ray.remote
      class Y:
          def f(self):
              return RETURN_VALUE
  
      Y.options(lifetime="detached", name="test").remote()
      assert ray.util.list_named_actors() == ["test"]
      y = ray.get_actor("test")
      assert ray.get(y.f.remote()) == RETURN_VALUE
  
      ray.kill(y)
      assert not ray.util.list_named_actors()
      with pytest.raises(ValueError):
          ray.get_actor("test")
  
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 19 for calling a global function with example usage: test_detached_actor_local_mode(ray_start_regular) and returns: RETURN_VALUE