def METHOD_NAME(self):
    if self.parent is None:
        raise IndexError("Next does not exist")
    idx = self.parent.children.index(self)
    if idx < len(self.parent.children) - 1:
        return self.parent.children[idx + 1]
    else:
        return self.parent.METHOD_NAME().children[0]