code: def test_get_actor_when_gcs_is_down(
      ray_start_regular_with_external_redis,
  ):
      @ray.remote
      def create_actor():
          @ray.remote
          class A:
              def pid(self):
                  return os.getpid()
  
          a = A.options(lifetime="detached", name="A").remote()
          ray.get(a.pid.remote())
  
      ray.get(create_actor.remote())
  
      ray._private.worker._global_node.kill_gcs_server()
  
      with pytest.raises(ray.exceptions.GetTimeoutError):
          ray.get_actor("A")
  
imports: import sys
  import os
  import threading
  from time import sleep
  import pytest
  import ray
  from ray._private.utils import get_or_create_event_loop
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
  import ray._private.gcs_utils
  from ray._private import ray_constants
  from ray._private.test_utils import convert_actor_state, enable_external_redis, generate_system_config_map, wait_for_condition, wait_for_pid_to_exit, run_string_as_driver
  from ray.job_submission import JobSubmissionClient, JobStatus
  from ray._raylet import GcsClient
  import psutil
label_desc: Use image node_id 16 for calling a global function with example usage: test_get_actor_when_gcs_is_down(ray_start_regular_with_external_redis) and returns: os