code: def _build_colormap(name, num_bins=256):
      base = cm.get_cmap(name)
      color_list = base(np.linspace(0, 1, num_bins))
      cmap_name = base.name + str(num_bins)
      colormap = LinearSegmentedColormap.from_list(
          cmap_name, color_list, num_bins
      )
      colormap = colormap(np.linspace(0, 1, num_bins))[:, :3]
      return colormap
  
file_path: nerfies/nerfies/visualization.py
imports: import functools
  from matplotlib import cm
  from matplotlib.colors import LinearSegmentedColormap
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _build_colormap(name, num_bins) and returns: colormap