(self, format_callback=None)
return roots
Return the graph as a nested list.
Return the graph as a nested list.
Return the graph as a nested list .
def nested(self, format_callback=None):
        """
        Return the graph as a nested list.

        """
        seen = set()
        roots = []
        for root in self.edges.get(None, ()):
            roots.extend(self._nested(root, seen, format_callback))
        return roots
def nested ( self , format_callback = None ) : seen = set ( ) roots = [ ] for root in self . edges . get ( None , ( ) ) : roots . extend ( self . _nested ( root , seen , format_callback ) ) return roots