code: def get_cmap(cmap=None):
      
  
      if isinstance(cmap, matplotlib.colors.Colormap):
          return cmap
      if isinstance(cmap, str):
          cmap_name = cmap
      else:
          cmap_name = DEFAULT_COLOR_MAP_NAME
      return plt.get_cmap(cmap_name)
docs: Loads a matplotlib colormap if specified or supplies the default.
  
      Parameters
      ----------
      cmap: string or matplotlib.colors.Colormap instance
          The name of the Matplotlib colormap to look up.
  
      Returns
      -------
      The desired Matplotlib colormap
  
      Raises
      ------
      ValueError if colormap name is not recognized by Matplotlib