https://github.com/apache/airflow/blob/main/airflow/cli/commands/task_command.py#L145
return task_instance.get_previous_dagrun(state=DagRunState.SUCCESS, session=session)
    def _get_previous_dagrun_data_interval_success() -> DataInterval | None:
        dagrun = _get_previous_dagrun_success()
        if dagrun is None:
            return None
        return dag.get_run_data_interval(dagrun)
    def get_prev_data_interval_start_success() -> pendulum.DateTime | None:
        data_interval = _get_previous_dagrun_data_interval_success()
        if data_interval is None:
            return None
        return data_interval.start
    def get_prev_data_interval_end_success() -> pendulum.DateTime | None:
        data_interval = _get_previous_dagrun_data_interval_success()
        if data_interval is None:
            return None
        return data_interval.end
    def get_prev_start_date_success() -> pendulum.DateTime | None:
        dagrun = _get_previous_dagrun_success()
        if dagrun is None:
            return None
        return timezone.coerce_datetime(dagrun.start_date)
    def get_prev_end_date_success() -> pendulum.DateTime | None:
        dagrun = _get_previous_dagrun_success()
        if dagrun is None:
            return None
        return timezone.coerce_datetime(dagrun.end_date)
    @cache
    def get_yesterday_ds() -> str: