def __init__(self, filename=None):
        self.filename = None
        if filename:
            self.load(filename)
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)