A list of all the parent nodes of this node, back to the root.
        parents[0] is the root, and parents[-1] is the immediate parent.

def parents(self):
        """A list of all the parent nodes of this node, back to the root.
        parents[0] is the root, and parents[-1] is the immediate parent.
        """
        try:
            parents = self.parent.parents
            parents.append(self.parent)
        except AttributeError:
            parents = []
        return parents