class_docstr: Is the past dagrun in a state that allows this task instance to run.
  
  For example, did this task instance's task in the previous dagrun complete
  if we are depending on past?
class_docstr_tok: ["Is","the","past","dagrun","in","a","state","that","allows","this","task","instance","to","run",".","For","example",",","did","this","task","instance","'s","task","in","the","previous","dagrun","complete","if","we","are","depending","on","past","?"]
docstr: Check if a task has ever been run before.
  
  This function exists for easy mocking in tests.
docstr_tok: ["Check","if","a","task","has","ever","been","run","before",".","This","function","exists","for","easy","mocking","in","tests","."]
code: def _has_any_prior_tis(ti: TI, *, session: Session) -> bool:
      """Check if a task has ever been run before.
  
      This function exists for easy mocking in tests.
      """
      return exists_query(
          TI.dag_id == ti.dag_id,
          TI.task_id == ti.task_id,
          TI.execution_date < ti.execution_date,
          session=session,
      )
  
file_path: airflow/airflow/ti_deps/deps/prev_dagrun_dep.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from sqlalchemy import func, or_, select
  from airflow.models.dagrun import DagRun
  from airflow.models.taskinstance import PAST_DEPENDS_MET, TaskInstance
  from airflow.ti_deps.deps.base_ti_dep import BaseTIDep
  from airflow.utils.db import exists_query
  from airflow.utils.session import provide_session
  from airflow.utils.state import TaskInstanceState
label_desc: Use image node_id 3 for calling the PrevDagrunDep obj's underlying member method code with example usage: obj._has_any_prior_tis(ti) and returns: exists_query