class_docstr: LocalTaskJob runs a single task instance.
class_docstr_tok: ["LocalTaskJob","runs","a","single","task","instance","."]
code: def __init__(
      self,
      job: Job,
      task_instance: TaskInstance | TaskInstancePydantic,
      ignore_all_deps: bool = False,
      ignore_depends_on_past: bool = False,
      wait_for_past_depends_before_skipping: bool = False,
      ignore_task_deps: bool = False,
      ignore_ti_state: bool = False,
      mark_success: bool = False,
      pickle_id: int | None = None,
      pool: str | None = None,
      external_executor_id: str | None = None,
  ):
      super().__init__(job)
      LoggingMixin.__init__(self, context=task_instance)
      self.task_instance = task_instance
      self.ignore_all_deps = ignore_all_deps
      self.ignore_depends_on_past = ignore_depends_on_past
      self.wait_for_past_depends_before_skipping = (
          wait_for_past_depends_before_skipping
      )
      self.ignore_task_deps = ignore_task_deps
      self.ignore_ti_state = ignore_ti_state
      self.pool = pool
      self.pickle_id = pickle_id
      self.mark_success = mark_success
      self.external_executor_id = external_executor_id
      # terminating state is used so that a job don't try to
      # terminate multiple times
      self.terminating = False
  
      self._state_change_checks = 0
  
imports: from __future__ import annotations
  import signal
  from typing import TYPE_CHECKING
  import psutil
  from airflow.configuration import conf
  from airflow.exceptions import AirflowException
  from airflow.jobs.base_job_runner import BaseJobRunner
  from airflow.jobs.job import perform_heartbeat
  from airflow.models.taskinstance import TaskReturnCode
  from airflow.stats import Stats
  from airflow.utils import timezone
  from airflow.utils.log.file_task_handler import _set_task_deferred_context_var
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.net import get_hostname
  from airflow.utils.platform import IS_WINDOWS
  from airflow.utils.session import NEW_SESSION, provide_session
  from airflow.utils.state import TaskInstanceState
label_desc: Use image node_id 1 to create a new LocalTaskJobRunner object from inherited base classes: BaseJobRunner, LoggingMixin with example: obj = LocalTaskJobRunner(job, task_instance, ignore_all_deps, ignore_depends_on_past, wait_for_past_depends_before_skipping, ignore_task_deps, ignore_ti_state, mark_success, pickle_id, pool, external_executor_id)