code: def parents(self):
          
          try:
              parents = self.parent.parents
              parents.append(self.parent)
          except AttributeError:
              parents = []
          return parents
docs: 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.