<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_cmap(cmap=None):
 """ 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 """


    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)