Return the nodes as a list of lists.

def as_tree(self):
        "Return the nodes as a list of lists."
        if self._nodes is None:
            return [self]
        ret = [self]
        for node in self._nodes:
            ret.append(node.as_tree())
        return ret