code: def test_function_table_gc_actor(call_ray_start):
      """If there is a detached actor, the table won't be cleaned up."""
      ray.init(address="auto", namespace="a")
  
      @ray.remote
      class Actor:
          def ready(self):
              return
  
      # If there is a detached actor, the function won't be deleted.
      a = Actor.options(lifetime="detached", name="a").remote()
      ray.get(a.ready.remote())
      job_id = (
          ray._private.worker.global_worker.current_job_id.hex().encode()
      )
      ray.shutdown()
  
      ray.init(address="auto", namespace="b")
      with pytest.raises(Exception):
          wait_for_condition(lambda: function_entry_num(job_id) == 0)
      a = ray.get_actor("a", namespace="a")
      ray.kill(a)
      wait_for_condition(lambda: function_entry_num(job_id) == 0)
  
      # If there is not a detached actor, it'll be deleted when the job finishes.
      a = Actor.remote()
      ray.get(a.ready.remote())
      job_id = (
          ray._private.worker.global_worker.current_job_id.hex().encode()
      )
      ray.shutdown()
      ray.init(address="auto", namespace="c")
      wait_for_condition(lambda: function_entry_num(job_id) == 0)
  
imports: import os
  import sys
  import time
  import pytest
  import ray
  import ray._private.ray_constants
  from ray._private.test_utils import Semaphore, enable_external_redis, client_test_enabled, run_string_as_driver, wait_for_condition, get_gcs_memory_used, run_string_as_driver_nonblocking
  from ray.experimental.internal_kv import _internal_kv_list
  from ray.tests.conftest import call_ray_start
  import subprocess
  import psutil
label_desc: Use image node_id 6 for calling a global function with example usage: test_function_table_gc_actor(call_ray_start) without return types