'Returns the last previous sibling Element of the given element.'

def _previous_sibling(self, e):

    while isinstance(e, Node):
        e = e.previous
        if isinstance(e, Element):
            return e
