code: def test_healthcheck_ray_client_server():
      res = subprocess.run(
          ["ray", "health-check", "--component", "ray_client_server"]
      )
      assert res.returncode != 0
  
      ray.init()
      res = subprocess.run(
          ["ray", "health-check", "--component", "ray_client_server"]
      )
      assert res.returncode != 0, res.stdout
  
      client_server_handle = subprocess.Popen(
          [sys.executable, "-m", "ray.util.client.server"]
      )
      # Gotta give the server time to initialize.
      time.sleep(5)
  
      res = subprocess.run(
          ["ray", "health-check", "--component", "ray_client_server"]
      )
      assert res.returncode == 0, res.stdout
  
      client_server_handle.send_signal(signal.SIGKILL)
      time.sleep(ray._private.ray_constants.HEALTHCHECK_EXPIRATION_S)
      res = subprocess.run(
          ["ray", "health-check", "--component", "ray_client_server"]
      )
      assert res.returncode != 0, res.stdout
  
      ray.shutdown()
      res = subprocess.run(
          ["ray", "health-check", "--component", "ray_client_server"]
      )
      assert res.returncode != 0, res.stdout
  
file_path: ray/python/ray/tests/test_healthcheck.py
imports: import logging
  import signal
  import subprocess
  import sys
  import time
  import psutil
  import pytest
  import ray
  from ray._private import ray_constants
label_desc: Use image node_id 2 for calling a global function with example usage: test_healthcheck_ray_client_server() without return types