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 _makeChildren(self, boundPen=None):
      cs = QtCore.Qt.PenCapStyle
      js = QtCore.Qt.PenJoinStyle
      ps = QtCore.Qt.PenStyle
      param = Parameter.create(
          name="Params",
          type="group",
          children=[
              dict(name="color", type="color", value="k"),
              dict(name="width", value=1, type="int", limits=[0, None]),
              QtEnumParameter(ps, name="style", value="SolidLine"),
              QtEnumParameter(cs, name="capStyle"),
              QtEnumParameter(js, name="joinStyle"),
              dict(name="cosmetic", type="bool", value=True),
          ],
      )
  
      optsPen = boundPen or fn.mkPen()
      for p in param:
          name = p.name()
          # Qt naming scheme uses isXXX for booleans
          if isinstance(p.value(), bool):
              attrName = f"is{name.title()}"
          else:
              attrName = name
          default = getattr(optsPen, attrName)()
          replace = r"\1 \2"
          name = re.sub(r"(\w)([A-Z])", replace, name)
          name = name.title().strip()
          p.setOpts(title=name, default=default)
  
      if boundPen is not None:
          self.updateFromPen(param, boundPen)
          for p in param:
              setName = f"set{p.name().capitalize()}"
              # Instead, set the parameter which will signal the old setter
              setattr(boundPen, setName, p.setValue)
              newSetter = self.penPropertySetter
              # Edge case: color picker uses a dialog with user interaction, so wait until full change there
              if p.type() != "color":
                  p.sigValueChanging.connect(newSetter)
              # Force children to emulate self's value instead of being part of a tree like normal
              try:
                  p.sigValueChanged.disconnect(p._emitValueChanged)
              except RuntimeError:
                  # workaround https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2487
                  # that affects PySide 6.5.3
                  # Since the child param was freshly created by us, there can only have been one slot
                  # connected. So we can just disconnect all the slots without specifying which one.
                  assert (
                      p.receivers(
                          QtCore.SIGNAL(
                              "sigValueChanged(PyObject,PyObject)"
                          )
                      )
                      == 1
                  )
                  p.sigValueChanged.disconnect()
              # Some widgets (e.g. checkbox, combobox) don't emit 'changing' signals, so tie to 'changed' as well
              p.sigValueChanged.connect(newSetter)
  
      return param
  
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 11 for calling the PenParameter obj's underlying member method code with example usage: obj._makeChildren(boundPen) and returns: param