code: def set_line_text(self, line_nbr, new_text):
          
          editor = self._editor
          text_cursor = self._move_cursor_to(line_nbr)
          text_cursor.select(text_cursor.LineUnderCursor)
          text_cursor.insertText(new_text)
          editor.setTextCursor(text_cursor)
docs: Replace an entire line with ``new_text``.
  
          :param line_nbr: line number of the line to change.
          :param new_text: The replacement text.