code: def test_serve_logs_on_scheduler(
      self,
      mock_process,
      mock_scheduler_job,
      executor,
      expect_serve_logs,
  ):
      mock_scheduler_job.return_value.job_type = "SchedulerJob"
      args = self.parser.parse_args(["scheduler"])
  
      with conf_vars({("core", "executor"): executor}):
          scheduler_command.scheduler(args)
          if expect_serve_logs:
              mock_process.assert_has_calls(
                  [mock.call(target=serve_logs)]
              )
          else:
              with pytest.raises(AssertionError):
                  mock_process.assert_has_calls(
                      [mock.call(target=serve_logs)]
                  )
  
imports: from __future__ import annotations
  from http.server import BaseHTTPRequestHandler
  from unittest import mock
  from unittest.mock import MagicMock
  import pytest
  from airflow.cli import cli_parser
  from airflow.cli.commands import scheduler_command
  from airflow.utils.scheduler_health import HealthServer, serve_health_check
  from airflow.utils.serve_logs import serve_logs
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 2 for calling the TestSchedulerCommand obj's underlying member method code with example usage: obj.test_serve_logs_on_scheduler(mock_process, mock_scheduler_job, executor, expect_serve_logs) without return types