code: def get_cmap(name=None, lut=None):
      """
      Get a colormap instance, defaulting to rc values if *name* is None
      """
      if name is None:
          name = mpl.rcParams["image.cmap"]
      if lut is None:
          lut = mpl.rcParams["image.lut"]
  
      assert name in datad.keys()
      return colors.LinearSegmentedColormap(name, datad[name], lut)
  
imports: import numpy
  from numpy import ma
  import matplotlib
  import matplotlib.colors
  import matplotlib.cbook
  from matplotlib._cm import *
label_desc: Use image node_id 1 for calling a global function with example usage: get_cmap(name, lut) and returns: colors