def moveAfterSibling(self, itemId, siblingId):
        parent2 = self.getParent(itemId)
        if parent2 is None:
            childrenList = self._roots
        else:
            childrenList = self._children.get(parent2)

        if siblingId is None:
            childrenList.remove(itemId)
            childrenList.insert(0, itemId)

        else:
            oldIndex = childrenList.index(itemId)
            indexOfSibling = childrenList.index(siblingId)
            if (indexOfSibling != -1) and (oldIndex != -1):
                if oldIndex > indexOfSibling:
                    newIndex = indexOfSibling + 1
                else:
                    newIndex = indexOfSibling

                del childrenList[oldIndex]
                childrenList.insert(newIndex, itemId)
            else:
                raise ValueError('Given identifiers do not have the '
                        'same parent.')

        self.fireItemSetChange()
Moves a node (an Item) in the container immediately after a sibling
dataset/ETHPy150Open rwl/muntjac/muntjac/data/util/hierarchical_container.py/HierarchicalContainer.moveAfterSibling