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


        cursor = self.textCursor()
        self.__select_text_under_cursor_blocks(cursor)
        text = cursor.selectedText()

        cursor.setPosition(cursor.block().next().position())
        cursor.position() == cursor.document().firstBlock().position() and cursor.setPosition(
            cursor.document().lastBlock().position())

        start_position = cursor.position()
        cursor.insertText(text)
        end_position = cursor.position()
        cursor.insertText(QChar(QChar.ParagraphSeparator))

        cursor.setPosition(start_position, QTextCursor.MoveAnchor)
        cursor.setPosition(end_position, QTextCursor.KeepAnchor)
        self.setTextCursor(cursor)

        return True