code: def buildMenuEntryWidget(cmap, text):
      lut = cmap.getLookupTable(nPts=32, alpha=True)
      qimg = QtGui.QImage(
          lut, len(lut), 1, QtGui.QImage.Format.Format_RGBA8888
      )
      pixmap = QtGui.QPixmap.fromImage(qimg)
  
      widget = QtWidgets.QWidget()
      layout = QtWidgets.QHBoxLayout(widget)
      layout.setContentsMargins(1, 1, 1, 1)
      label1 = QtWidgets.QLabel()
      label1.setScaledContents(True)
      label1.setPixmap(pixmap)
      label2 = QtWidgets.QLabel(text)
      layout.addWidget(label1, 0)
      layout.addWidget(label2, 1)
  
      return widget
  
imports: import importlib.util
  import re
  import numpy
  from ..None import colormap
  from ..None import functions
  from ..graphicsItems.GradientPresets import Gradients
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 1 for calling a global function with example usage: buildMenuEntryWidget(cmap, text) and returns: widget