https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
ignore_param_exceptions: bool = True,
) -> Context:
    """
    Return TI Context.
    :param task_instance: the task instance
    :param session: SQLAlchemy ORM Session
    :param ignore_param_exceptions: flag to suppress value exceptions while initializing the ParamsDict
    :meta private:
    """
    
    if not session:
        session = settings.Session()
    from airflow import macros
    from airflow.models.abstractoperator import NotMapped
    integrate_macros_plugins()
    task = task_instance.task
    if TYPE_CHECKING:
        assert task.dag
    dag: DAG = task.dag
    dag_run = task_instance.get_dagrun(session)
    data_interval = dag.get_run_data_interval(dag_run)
    validated_params = process_params(dag, task, dag_run, suppress_exception=ignore_param_exceptions)
    logical_date = timezone.coerce_datetime(task_instance.execution_date)
    ds = logical_date.strftime("%Y-%m-%d")
    ds_nodash = ds.replace("-", "")
    ts = logical_date.isoformat()
    ts_nodash = logical_date.strftime("%Y%m%dT%H%M%S")
    ts_nodash_with_tz = ts.replace("-", "").replace(":", "")
    @cache  
    def _get_previous_dagrun_success() -> DagRun | None: