docs: def write(text_edit, text, color):
          """
          Default write function. Move the cursor to the end and insert text with
          the specified color.
  
          :param text_edit: QInteractiveConsole instance
          :type text_edit: pyqode.widgets.QInteractiveConsole
  
          :param text: Text to write
          :type text: str
  
          :param color: Desired text color
          :type color: QColor
          """
          try:
              text_edit.moveCursor(QTextCursor.End)
              text_edit.setTextColor(color)
              text_edit.insertPlainText(text)
              text_edit.moveCursor(QTextCursor.End)
          except RuntimeError:
              pass