code: def check_runner_initialized(
      job_runner: Optional[BaseJobRunner], job_type: str
  ) -> BaseJobRunner:
      if job_runner is None:
          raise ValueError(
              f"In order to run {job_type} you need to initialize the {job_type}Runner first."
          )
      return job_runner
  
file_path: airflow/airflow/serialization/pydantic/job.py
imports: import datetime
  from functools import cached_property
  from typing import Optional
  from pydantic import BaseModel, ConfigDict
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.jobs.base_job_runner import BaseJobRunner
label_desc: Use image node_id 1 for calling a global function with example usage: check_runner_initialized(job_runner, job_type) and returns: job_runner