include_upstream=False,
        )
        task_subset.clear(
            start_date=start_date,
            end_date=end_date,
            include_subdags=True,
            include_parentdag=True,
            only_failed=True,
            session=session,
            
            exclude_task_ids=frozenset(task_ids),
        )
        del locked_dag_run_ids
        return altered
    @property
    def roots(self) -> list[Operator]:
        """Return nodes with no parents. These are first to execute and are called roots or root nodes."""
        return [task for task in self.tasks if not task.upstream_list]
    @property
    def leaves(self) -> list[Operator]:
        """Return nodes with no children. These are last to execute and are called leaves or leaf nodes."""
        return [task for task in self.tasks if not task.downstream_list]
    def topological_sort(self, include_subdag_tasks: bool = False):
        """
        Sorts tasks in topographical order, such that a task comes after any of its
        upstream dependencies.
        Deprecated in place of ``task_group.topological_sort``
        """
        from airflow.utils.task_group import TaskGroup
        def nested_topo(group):