'Return next child in parent\'s children, or None.'

def get_next_sibling(self):

    if (self.parent is None):
        return None
    for (i, child) in enumerate(self.parent.children):
        if (child is self):
            try:
                return self.parent.children[(i + 1)]
            except IndexError:
                return None
