def add_item(self, item, position=None):
        if not isinstance(item, BaseItem):
            raise ValueError("Items must be subclasses of cms.toolbar.items.BaseItem, %r isn't" % item)
        if isinstance(position, ItemSearchResult):
            position = position.index
        elif isinstance(position, BaseItem):
            position = self._item_position(position)
        elif not (position is None or isinstance(position, (int,))):
            raise ValueError(position % "Position must be None, an integer, an item or an ItemSearchResult, got %r instead")
        self._add_item(item, position)
        self._memoize(item)
        return item
dataset/ETHPy150Open divio/django-cms/cms/toolbar/items.py/ToolbarAPIMixin.add_item/swapped operands of `%`