(self)
return node
Get the next node to visit.

        :return: A node in the graph.
Get the next node to visit.
Get the next node to visit .
def next_node(self) -> Optional[NodeType]:
        """
        Get the next node to visit.

        :return: A node in the graph.
        """

        if not self._sorted_nodes:
            return None

        node = self._sorted_nodes.pop(0)
        self._nodes_set.remove(node)
        return node
def next_node ( self ) -> Optional [ NodeType ] : if not self . _sorted_nodes : return None node = self . _sorted_nodes . pop ( 0 ) self . _nodes_set . remove ( node ) return node