def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
def tearDown(self):
        if hasattr(self, "rng_state"):
            torch.set_rng_state(self.rng_state)