def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def local_rank(self) -> int:
        return 0 if self._local_rank is None else self._local_rank