def METHOD_NAME(self) -> List[T]:
    result: List[T] = []
    if not self.is_acyclic():
        raise CycleError
    ready_nodes: Deque[NodeInfo] = deque(
        [n for n in self._nodes.values() if n.num_predecessors == 0])
    while ready_nodes:
        current_node: NodeInfo = ready_nodes.popleft()
        for v in current_node.successors:
            v.num_predecessors -= 1
            if v.num_predecessors == 0:
                ready_nodes.append(v)
        result.append(current_node.node)
    return result