code: def plot_linearmap(cdict):
      newcmp = LinearSegmentedColormap(
          "testCmap", segmentdata=cdict, N=256
      )
      rgba = newcmp(np.linspace(0, 1, 256))
      fig, ax = plt.subplots(figsize=(4, 3), layout="constrained")
      col = ["r", "g", "b"]
      for xx in [0.25, 0.5, 0.75]:
          ax.axvline(xx, color="0.7", linestyle="--")
      for i in range(3):
          ax.plot(np.arange(256) / 256, rgba[:, i], color=col[i])
      ax.set_xlabel("index")
      ax.set_ylabel("RGB")
      plt.show()
  
imports: import matplotlib.pyplot
  import numpy
  import matplotlib
  from matplotlib.colors import LinearSegmentedColormap, ListedColormap
label_desc: Use image node_id 2 for calling a global function with example usage: plot_linearmap(cdict) without return types