code: def map(self, data):
      data = data[self.fieldName]
      colors = np.empty((len(data), 4))
      default = np.array(self["Default"].getRgbF())
      colors[:] = default
  
      for v in self.param("Values"):
          mask = data == v.maskValue
          c = np.array(v.value().getRgbF())
          colors[mask] = c
      # scaled = np.clip((data-self['Min']) / (self['Max']-self['Min']), 0, 1)
      # cmap = self.value()
      # colors = cmap.map(scaled, mode='float')
  
      # mask = np.isnan(data) | np.isinf(data)
      # nanColor = self['NaN']
      # nanColor = nanColor.getRgbF()
      # colors[mask] = nanColor
  
      return colors
  
imports: from collections import OrderedDict
  import numpy
  from ..None import functions
  from ..None import parametertree
  from ..Qt import QtCore
label_desc: Use image node_id 2 for calling the EnumColorMapItem obj's underlying member method code with example usage: obj.map(data) and returns: colors