code: def makeChild(chType, cfgDict):
      _encounteredTypes.add(chType)
      param = Parameter.create(name="widget", type=chType)
      param.setDefault(param.value())
  
      def setOpt(_param, _val):
          # Treat blank strings as "None" to allow 'unsetting' that option
          if isinstance(_val, str) and _val == "":
              _val = None
          param.setOpts(**{_param.name(): _val})
  
      optsChildren = []
      metaChildren = []
      for optName, optVals in cfgDict.items():
          child = Parameter.create(name=optName, **optVals)
          if " " in optName:
              metaChildren.append(child)
          else:
              optsChildren.append(child)
              child.sigValueChanged.connect(setOpt)
      # Poplate initial options
      for p in optsChildren:
          setOpt(p, p.value())
  
      grp = Parameter.create(
          name=f"Sample {chType.title()}",
          type="group",
          children=metaChildren + [param] + optsChildren,
      )
      grp.setOpts(expanded=False)
      return grp
  
imports: from _paramtreecfg import cfg
  from pyqtgraph.parametertree import Parameter
  from pyqtgraph.parametertree.Parameter import PARAM_TYPES
  from pyqtgraph.parametertree.parameterTypes import GroupParameter
label_desc: Use image node_id 1 for calling a global function with example usage: makeChild(chType, cfgDict) and returns: grp