class_docstr: Controls the appearance of a QPen value.
  
  When `saveState` is called, the value is encoded as (color, width, style, capStyle, joinStyle, cosmetic)
  
  ============== ========================================================
  **Options:**
  color          pen color, can be any argument accepted by :func:`~pyqtgraph.mkColor` (defaults to black)
  width          integer width >= 0 (defaults to 1)
  style          String version of QPenStyle enum, i.e. 'SolidLine' (default), 'DashLine', etc.
  capStyle       String version of QPenCapStyle enum, i.e. 'SquareCap' (default), 'RoundCap', etc.
  joinStyle      String version of QPenJoinStyle enum, i.e. 'BevelJoin' (default), 'RoundJoin', etc.
  cosmetic       Boolean, whether or not the pen is cosmetic (defaults to True)
  ============== ========================================================
code: def setOpts(self, **opts):
      # Transform opts into a value
      penOpts = self.applyOptsToPen(**opts)
      if penOpts:
          self.setValue(self.pen)
      return super().setOpts(**opts)
  
imports: import re
  from contextlib import ExitStack
  from .None import GroupParameterItem, WidgetParameterItem
  from .basetypes import GroupParameter, Parameter, ParameterItem
  from .qtenum import QtEnumParameter
  from ...None import functions
  from ...Qt import QtCore, QtWidgets
  from ...SignalProxy import SignalProxy
  from ...widgets.PenPreviewLabel import PenPreviewLabel
label_desc: Use image node_id 9 for calling the PenParameter obj's underlying member method code with example usage: obj.setOpts() and returns: super