Used in https://github.com/mhenc/airflow/blob/master/airflow/dag_processing/manager.py#L613

should be straighforward
session.flush()
        subdag = self.partial_subset(
            task_ids_or_regex={task_id},
            include_downstream=True,
            include_upstream=False,
        )
        if execution_date is None:
            dag_run = (
                session.query(DagRun).filter(DagRun.run_id == run_id, DagRun.dag_id == self.dag_id).one()
            )  
            resolve_execution_date = dag_run.execution_date
        else:
            resolve_execution_date = execution_date
        end_date = resolve_execution_date if not future else None
        start_date = resolve_execution_date if not past else None
        subdag.clear(
            start_date=start_date,
            end_date=end_date,
            include_subdags=True,
            include_parentdag=True,
            only_failed=True,
            session=session,
            
            exclude_task_ids={task_id},
        )
        return altered
    @property
    def roots(self) -> list[Operator]: