code: def heartbeat_too_slow():
      # case-2: unhealthy scheduler status - scenario 1 (SchedulerJob is running too slowly)
      last_heartbeat = timezone.utcnow() - datetime.timedelta(minutes=1)
      job = Job(
          state="running",
          latest_heartbeat=last_heartbeat,
      )
      SchedulerJobRunner(job=job)
      with create_session() as session:
          session.query(Job).filter(
              Job.job_type == "SchedulerJob",
          ).update(
              {
                  "latest_heartbeat": last_heartbeat
                  - datetime.timedelta(seconds=1)
              }
          )
          session.add(job)
      yield "unhealthy", last_heartbeat.isoformat()
      with create_session() as session:
          session.query(Job).filter(
              Job.job_type == "SchedulerJob",
              Job.state == "running",
              Job.latest_heartbeat == last_heartbeat,
          ).delete()
  
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 5 for calling a global function with example usage: heartbeat_too_slow() without return types