code: def test_healthcheck():
      res = subprocess.run(["ray", "health-check"])
      assert res.returncode != 0
  
      ray.init()
      res = subprocess.run(["ray", "health-check"])
      assert res.returncode == 0, res.stdout
  
      # Kill GCS to test ray health-check.
      all_processes = ray._private.worker._global_node.all_processes
      assert ray_constants.PROCESS_TYPE_GCS_SERVER in all_processes
      gcs_proc_info = all_processes[
          ray_constants.PROCESS_TYPE_GCS_SERVER
      ][0]
      gcs_proc = psutil.Process(gcs_proc_info.process.pid)
      gcs_proc.kill()
      gcs_proc.wait(10)
  
      res = subprocess.run(["ray", "health-check"])
      assert res.returncode != 0
  
      ray.shutdown()
  
      res = subprocess.run(["ray", "health-check"])
      assert res.returncode != 0
  
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 1 for calling a global function with example usage: test_healthcheck() without return types