'Finds the last element beneath this object to be parsed.'

def _last_descendant(self, is_initialized=True, accept_self=True):

    if (is_initialized and self.next_sibling):
        last_child = self.next_sibling.previous_element
    else:
        last_child = self
        while (isinstance(last_child, Tag) and last_child.contents):
            last_child = last_child.contents[(-1)]
    if ((not accept_self) and (last_child is self)):
        last_child = None
    return last_child
