code: def test_healthz_agent_2(monkeypatch, ray_start_cluster):
      monkeypatch.setenv("RAY_health_check_failure_threshold", "3")
      monkeypatch.setenv("RAY_health_check_timeout_ms", "100")
      monkeypatch.setenv("RAY_health_check_period_ms", "1000")
      monkeypatch.setenv("RAY_health_check_initial_delay_ms", "0")
  
      agent_port = find_free_port()
      h = ray_start_cluster.add_node(
          dashboard_agent_listen_port=agent_port
      )
      uri = f"http://localhost:{agent_port}/api/local_raylet_healthz"
  
      wait_for_condition(lambda: requests.get(uri).status_code == 200)
  
      import signal
  
      h.all_processes[ray_constants.PROCESS_TYPE_RAYLET][
          0
      ].process.send_signal(signal.SIGSTOP)
  
      # GCS still think raylet is alive.
      assert requests.get(uri).status_code == 200
      # But after heartbeat timeout, it'll think the raylet is down.
      wait_for_condition(lambda: requests.get(uri).status_code != 200)
  
file_path: ray/python/ray/dashboard/modules/healthz/tests/test_healthz.py
imports: import sys
  import pytest
  import requests
  import ray._private.ray_constants
  from ray.tests.conftest import *
  from ray._private.test_utils import find_free_port, wait_for_condition
label_desc: Use image node_id 3 for calling a global function with example usage: test_healthz_agent_2(monkeypatch, ray_start_cluster) without return types