code: def test_health(request, admin_client, heartbeat):
      # Load the corresponding fixture by name.
      (
          scheduler_status,
          last_scheduler_heartbeat,
      ) = request.getfixturevalue(heartbeat)
      resp = admin_client.get("health", follow_redirects=True)
      resp_json = json.loads(resp.data.decode("utf-8"))
      assert "healthy" == resp_json["metadatabase"]["status"]
      assert scheduler_status == resp_json["scheduler"]["status"]
      assert (
          last_scheduler_heartbeat
          == resp_json["scheduler"]["latest_scheduler_heartbeat"]
      )
  
imports: from __future__ import annotations
  import datetime
  import json
  import pytest
  from airflow.jobs.job import Job
  from airflow.jobs.scheduler_job_runner import SchedulerJobRunner
  from airflow.utils import timezone
  from airflow.utils.session import create_session
  from airflow.www import app
  from tests.test_utils.asserts import assert_queries_count
  from tests.test_utils.config import conf_vars
  from tests.test_utils.www import check_content_in_response, check_content_not_in_response
label_desc: Use image node_id 7 for calling a global function with example usage: test_health(request, admin_client, heartbeat) without return types