def blockIndentation(block):
            text = block.text()
            return text[:len(text) - len(text.lstrip())]
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)