class_docstr: Determines if a task's upstream tasks are in a state that allows a given task instance to run.
class_docstr_tok: ["Determines","if","a","task","'s","upstream","tasks","are","in","a","state","that","allows","a","given","task","instance","to","run","."]
code: def _get_dep_statuses(
      self,
      ti: TaskInstance,
      session: Session,
      dep_context: DepContext,
  ) -> Iterator[TIDepStatus]:
      # Checking that all upstream dependencies have succeeded.
      if not ti.task.upstream_task_ids:
          yield self._passing_status(
              reason="The task instance did not have any upstream tasks."
          )
          return
      if ti.task.trigger_rule == TR.ALWAYS:
          yield self._passing_status(
              reason="The task had a always trigger rule set."
          )
          return
      yield from self._evaluate_trigger_rule(
          ti=ti, dep_context=dep_context, session=session
      )
  
file_path: airflow/airflow/ti_deps/deps/trigger_rule_dep.py
imports: from __future__ import annotations
  import collections.abc
  import functools
  from collections import Counter
  from typing import TYPE_CHECKING, Iterator, KeysView, NamedTuple
  from sqlalchemy import and_, func, or_, select
  from airflow.models.taskinstance import PAST_DEPENDS_MET
  from airflow.ti_deps.deps.base_ti_dep import BaseTIDep
  from airflow.utils.state import TaskInstanceState
  from airflow.utils.trigger_rule import TriggerRule
label_desc: Use image node_id 1 for calling the TriggerRuleDep obj's underlying member method code with example usage: obj._get_dep_statuses(ti, session, dep_context) without return types