code: def test_types():
      paramSpec = [
          dict(name="float", type="float"),
          dict(name="int", type="int"),
          dict(name="str", type="str"),
          dict(name="list", type="list", limits=["x", "y", "z"]),
          dict(
              name="dict", type="list", limits={"x": 1, "y": 3, "z": 7}
          ),
          dict(name="bool", type="bool"),
          dict(name="color", type="color"),
      ]
  
      param = pt.Parameter.create(
          name="params", type="group", children=paramSpec
      )
      tree = pt.ParameterTree()
      tree.setParameters(param)
  
      all_objs = {
          "int0": 0,
          "int": 7,
          "float": -0.35,
          "bigfloat": 1e129,
          "npfloat": np.float64(5),
          "npint": np.int64(5),
          "npinf": np.inf,
          "npnan": np.nan,
          "bool": True,
          "complex": 5 + 3j,
          "str": "#xxx",
          "unicode": "µ",
          "list": [1, 2, 3],
          "dict": {"1": 2},
          "color": pg.mkColor("k"),
          "brush": pg.mkBrush("k"),
          "pen": pg.mkPen("k"),
          "none": None,
      }
      if hasattr(QtCore, "QString"):
          all_objs["qstring"] = QtCore.QString("xxxµ")
  
      # float
      types = [
          "int0",
          "int",
          "float",
          "bigfloat",
          "npfloat",
          "npint",
          "npinf",
          "npnan",
          "bool",
      ]
      check_param_types(
          param.child("float"), float, float, 0.0, all_objs, types
      )
  
      # int
      types = [
          "int0",
          "int",
          "float",
          "bigfloat",
          "npfloat",
          "npint",
          "bool",
      ]
      check_param_types(
          param.child("int"), int, int, 0, all_objs, types
      )
  
      # str  (should be able to make a string out of any type)
      types = all_objs.keys()
      check_param_types(
          param.child("str"), str, str, "", all_objs, types
      )
  
      # bool  (should be able to make a boolean out of any type?)
      types = all_objs.keys()
      check_param_types(
          param.child("bool"), bool, bool, False, all_objs, types
      )
  
      # color
      types = [
          "color",
          "int0",
          "int",
          "float",
          "npfloat",
          "npint",
          "list",
      ]
      init = QtGui.QColor(128, 128, 128, 255)
      check_param_types(
          param.child("color"),
          QtGui.QColor,
          pg.mkColor,
          init,
          all_objs,
          types,
      )
  
file_path: pyqtgraph/tests/parametertree/test_parametertypes.py
imports: from unittest.mock import MagicMock
  import numpy
  import pyqtgraph
  import pyqtgraph.parametertree
  from pyqtgraph.functions import eq
  from pyqtgraph.parametertree.parameterTypes import ChecklistParameterItem
  from pyqtgraph.Qt import QtCore, QtGui
label_desc: Use image node_id 3 for calling a global function with example usage: test_types() without return types