def METHOD_NAME(self) -> List[List[Task]]:
    dag = self._build_dag()
    remove = [node for node, degree in dict(dag.in_degree).items() if degree == 0 and isinstance(node, DataNode)]
    dag.remove_nodes_from(remove)
    return list(nodes for nodes in nx.topological_generations(dag) if (Task in (type(node) for node in nodes)))