def create_set_cmap(values, cmap_name, alpha=255):
    """
    return a dict of colors corresponding to the unique values
    
    :param values: values to be mapped
    :param cmap_name: colormap name
    :param alpha: color alpha
    :return: dict of colors corresponding to the unique values
    """
    unique_values = list(set(values))
    shuffle(unique_values)
    from pylab import get_cmap
    cmap = get_cmap(cmap_name)
    d = {}
    for i in range(len(unique_values)):
        d[unique_values[i]] = _convert_color_format(cmap(1.*i/len(unique_values)), alpha)
    return d
dataset/ETHPy150Open andrea-cuttone/geoplotlib/geoplotlib/colors.py/create_set_cmap/original