def clear(self):
        super(GroupedRequirements, self).clear()
        self.create_default_groups()
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)