code: def test_gcs_connection_no_leak(ray_start_cluster):
      cluster = ray_start_cluster
      head_node = cluster.add_node()
  
      gcs_server_process = head_node.all_processes["gcs_server"][
          0
      ].process
      gcs_server_pid = gcs_server_process.pid
  
      ray.init(cluster.address)
  
      def get_gcs_num_of_connections():
          p = psutil.Process(gcs_server_pid)
          print(">>", len(p.connections()))
          return len(p.connections())
  
      # Wait for everything to be ready.
      import time
  
      time.sleep(10)
  
      fds_without_workers = get_gcs_num_of_connections()
  
      @ray.remote
      class A:
          def ready(self):
              print("HELLO")
              return "WORLD"
  
      num_of_actors = 10
      actors = [A.remote() for _ in range(num_of_actors)]
      print(ray.get([t.ready.remote() for t in actors]))
  
      # Kill the actors
      del actors
  
      # Make sure the # of fds opened by the GCS dropped.
      # This assumes worker processes are not created after the actor worker
      # processes die.
      wait_for_condition(
          lambda: get_gcs_num_of_connections() <= fds_without_workers
      )
      num_fds_after_workers_die = get_gcs_num_of_connections()
  
      n = cluster.add_node(wait=True)
  
      # Make sure the # of fds opened by the GCS increased.
      wait_for_condition(
          lambda: get_gcs_num_of_connections()
          > num_fds_after_workers_die
      )
  
      cluster.remove_node(n)
  
      # Make sure the # of fds opened by the GCS dropped.
      wait_for_condition(
          lambda: get_gcs_num_of_connections() <= fds_without_workers
      )
  
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 10 for calling a global function with example usage: test_gcs_connection_no_leak(ray_start_cluster) and returns: len, str