<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def indent(self):
 """ Indents the document text under cursor. :return: Method success. :rtype: bool """


        cursor = self.textCursor()
        if not cursor.hasSelection():
            cursor.insertText(self.__indent_marker)
        else:
            block = self.document().findBlock(cursor.selectionStart())
            while True:
                block_cursor = self.textCursor()
                block_cursor.setPosition(block.position())
                block_cursor.insertText(self.__indent_marker)
                if block.contains(cursor.selectionEnd()):
                    break
                block = block.next()
        return True