'Adds an item into our containers, and index it depending on the `index` flag.
:param item:    The item to add
:param index:   Flag indicating if the item should be indexed'

def add_item(self, item, index=True):

    name_property = getattr(self.__class__, 'name_property', None)
    if ((index is True) and name_property):
        item = self.index_item(item)
    self.items[item.id] = item
