def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def remove(root, key):
    left, right = split(root, key)
    return merge(left, split(right, key + 1)[1])