class_docstr: Container for colormaps that are known to Matplotlib by name.
  
  The universal registry instance is `matplotlib.colormaps`. There should be
  no need for users to instantiate `.ColormapRegistry` themselves.
  
  Read access uses a dict-like interface mapping names to `.Colormap`\s::
  
      import matplotlib as mpl
      cmap = mpl.colormaps['viridis']
  
  Returned `.Colormap`\s are copies, so that their modification does not
  change the global definition of the colormap.
  
  Additional colormaps can be added via `.ColormapRegistry.register`::
  
      mpl.colormaps.register(my_colormap)
  
  To get a list of all registered colormaps, you can do::
  
      from matplotlib import colormaps
      list(colormaps)
docstr: Return a color map specified through *cmap*.
  
  Parameters
  ----------
  cmap : str or `~matplotlib.colors.Colormap` or None
  
      - if a `.Colormap`, return it
      - if a string, look it up in ``mpl.colormaps``
      - if None, return the Colormap defined in :rc:`image.cmap`
  
  Returns
  -------
  Colormap
docstr_tok: ["Return","a","color","map","specified","through","*","cmap","*",".","Parameters","--","--","--","--","--","cmap",":","str","or","`","~matplotlib.colors.Colormap","`","or","None","-","if","a","`",".Colormap","`",",","return","it","-","if","a","string",",","look","it","up","in","``","mpl.colormaps","``","-","if","None",",","return","the","Colormap","defined","in",":","rc",":","`","image.cmap","`","Returns","--","--","--","-","Colormap"]
code: def get_cmap(self, cmap):
      """
      Return a color map specified through *cmap*.
  
      Parameters
      ----------
      cmap : str or `~matplotlib.colors.Colormap` or None
  
          - if a `.Colormap`, return it
          - if a string, look it up in ``mpl.colormaps``
          - if None, return the Colormap defined in :rc:`image.cmap`
  
      Returns
      -------
      Colormap
      """
      # get the default color map
      if cmap is None:
          return self[mpl.rcParams["image.cmap"]]
  
      # if the user passed in a Colormap, simply return it
      if isinstance(cmap, colors.Colormap):
          return cmap
      if isinstance(cmap, str):
          _api.check_in_list(sorted(_colormaps), cmap=cmap)
          # otherwise, it must be a string so look it up
          return self[cmap]
      raise TypeError(
          "get_cmap expects None or an instance of a str or Colormap . "
          + f"you passed {cmap!r} of type {type(cmap)}"
      )
  
imports: from collections.abc import Mapping
  import functools
  import numpy
  from numpy import ma
  import matplotlib
  from matplotlib import _api, colors, cbook, scale
  from matplotlib._cm import datad
  from matplotlib._cm_listed import cmaps
label_desc: Use image node_id 9 for calling the ColormapRegistry obj's underlying member method code with example usage: obj.get_cmap(cmap) and returns: self, cmap, self