Validate a dictionary of color lists

    Parameters
    ----------
    cmaps: dict
        a mapping from a colormap name to a list of colors

    Raises
    ------
    ValueError
        If one of the values in `cmaps` is not a color list

    Notes
    -----
    For all items (listname, list) in `cmaps`, the reversed list is
    automatically inserted with the ``listname + '_r'`` key.

def validate_cmaps(cmaps):
    """Validate a dictionary of color lists

    Parameters
    ----------
    cmaps: dict
        a mapping from a colormap name to a list of colors

    Raises
    ------
    ValueError
        If one of the values in `cmaps` is not a color list

    Notes
    -----
    For all items (listname, list) in `cmaps`, the reversed list is
    automatically inserted with the ``listname + '_r'`` key."""
    cmaps = {validate_str(key): validate_colorlist(val) for key, val in cmaps}
    for key, val in six.iteritems(cmaps):
        cmaps.setdefault(key + '_r', val[::-1])
    return cmaps