def indentBlock(block):
            cursor = cursorAtSpaceEnd(block)
            cursor.insertText(' ' if withSpace else self.text())
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)