code: def paintEvent(self, ev):
      path = QtGui.QPainterPath()
      displaySize = self.size()
      w, h = displaySize.width(), displaySize.height()
      # draw a squiggle with the pen
      path.moveTo(w * 0.2, h * 0.2)
      path.lineTo(w * 0.4, h * 0.8)
      path.cubicTo(w * 0.5, h * 0.1, w * 0.7, h * 0.1, w * 0.8, h * 0.8)
  
      painter = QtGui.QPainter(self)
      painter.setPen(self.pen)
      painter.drawPath(path)
  
      # No indication of "cosmetic" from just the paint path, so add something extra in that case
      if self.pen.isCosmetic():
          painter.setPen(mkPen("k"))
          painter.drawText(QtCore.QPointF(w * 0.81, 12), "C")
      painter.end()
  
imports: from ..Qt import QtWidgets, QtGui, QtCore
  from ..functions import mkPen
label_desc: Use image node_id 3 for calling the PenPreviewLabel obj's underlying member method code with example usage: obj.paintEvent(ev) without return types