code: def test_del_actor_after_gcs_server_restart(
      ray_start_regular_with_external_redis,
  ):
      actor = Increase.options(name="abc").remote()
      result = ray.get(actor.method.remote(1))
      assert result == 3
  
      ray._private.worker._global_node.kill_gcs_server()
      ray._private.worker._global_node.start_gcs_server()
  
      actor_id = actor._actor_id.hex()
      del actor
  
      def condition():
          actor_status = ray._private.state.actors(actor_id=actor_id)
          if actor_status["State"] == convert_actor_state(
              gcs_utils.ActorTableData.DEAD
          ):
              return True
          else:
              return False
  
      # Wait for the actor dead.
      wait_for_condition(condition, timeout=10)
  
      # If `PollOwnerForActorOutOfScope` was successfully called,
      # name should be properly deleted.
      with pytest.raises(ValueError):
          ray.get_actor("abc")
  
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 7 for calling a global function with example usage: test_del_actor_after_gcs_server_restart(ray_start_regular_with_external_redis) and returns: True, False