code: 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
docs: Return the graph as a nested list.