def __repr__(self):
        return "<Requirement(package={package}, version='{version}')>".format(
            package=self.package, version=self.version)
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)