code: def precedes(self, other):
          
          try:
              ancestor = next(commonancestors(AbstractElement, self, other))
          except StopIteration:
              raise Exception("Elements share no common ancestor")
          #now we just do a depth first search and see who comes first
          def callback(e):
              if e is self:
                  return True
              elif e is other:
                  return False
              return None
          result = ancestor.depthfirstsearch(callback)
          if result is None:
              raise Exception("Unable to find relation between elements! (shouldn't happen)")
          return result
docs: Returns a boolean indicating whether this element precedes the other element