code: def positions(self, reverse=False):
          
          def Posgen(reverse):
              if reverse:
                  lastrootsib = self.last_sibling_position(self.root)
                  current = self.last_decendant(lastrootsib)
                  while current is not None:
                      yield current
                      current = self.prev_position(current)
              else:
                  current = self.root
                  while current is not None:
                      yield current
                      current = self.next_position(current)
          return Posgen(reverse)
docs: returns a generator that walks the positions of this tree in DFO