code: def plot_color_gradients(cmap_category, cmap_list):
      fig, axs = plt.subplots(nrows=len(cmap_list), ncols=2)
      fig.subplots_adjust(
          top=0.95, bottom=0.01, left=0.2, right=0.99, wspace=0.05
      )
      fig.suptitle(
          cmap_category + " colormaps", fontsize=14, y=1.0, x=0.6
      )
  
      for ax, name in zip(axs, cmap_list):
          # Get RGB values for colormap.
          rgb = mpl.colormaps[name](x)[np.newaxis, :, :3]
  
          # Get colormap in CAM02-UCS colorspace. We want the lightness.
          lab = cspace_converter("sRGB1", "CAM02-UCS")(rgb)
          L = lab[0, :, 0]
          L = np.float32(np.vstack((L, L, L)))
  
          ax[0].imshow(
              gradient, aspect="auto", cmap=mpl.colormaps[name]
          )
          ax[1].imshow(
              L, aspect="auto", cmap="binary_r", vmin=0.0, vmax=100.0
          )
          pos = list(ax[0].get_position().bounds)
          x_text = pos[0] - 0.01
          y_text = pos[1] + pos[3] / 2.0
          fig.text(
              x_text, y_text, name, va="center", ha="right", fontsize=10
          )
  
      # Turn off *all* ticks & spines, not just the ones with colormaps.
      for ax in axs.flat:
          ax.set_axis_off()
  
      plt.show()
  
imports: from colorspacious import cspace_converter
  import matplotlib.pyplot
  import numpy
  import matplotlib
label_desc: Use image node_id 2 for calling a global function with example usage: plot_color_gradients(cmap_category, cmap_list) without return types