code: def make_test(dtype, kind, use_levels, lut_name, func_name):
      def time_test(self):
          data = getattr(self, dtype + "_data")
          levels = data["levels"] if use_levels else None
          lut = (
              getattr(self, f"{kind}_{lut_name}_lut", None)
              if lut_name is not None
              else None
          )
          pg.setConfigOption("useNumba", kind == "numba")
          img_data = data["data"]
          if kind == "cupy":
              img_data = cp.asarray(img_data)
          renderQImage(img_data, lut=lut, levels=levels)
  
      time_test.__name__ = func_name
      return time_test
  
file_path: pyqtgraph/benchmarks/renderImageItem.py
imports: import numpy
  import pyqtgraph
label_desc: Use image node_id 3 for calling a global function with example usage: make_test(dtype, kind, use_levels, lut_name, func_name) and returns: time_test