def _process_cmap(cmap):
    """
    Returns a kwarg dict suitable for a ColorScale
    """
    option = {}
    if isinstance(cmap, str):
        option['scheme'] = cmap
    elif isinstance(cmap, list):
        option['colors'] = cmap
    else:
        raise ValueError(
            """`cmap` must be a string (name of a color scheme)
                         or a list of colors, but a value of {} was given
                         """
            .format(cmap))
    return option
