def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def memoized(*args):
        try:
            return stored_results[args]
        except KeyError:
            result = stored_results[args] = fn(*args)
            return result