def gen_colors(clusters):
    """
    Takes 'clusters' and creates a list of colors so a cluster has a color.
    
    :param clusters: A flat list of integers where an integer represents which
        cluster the information belongs to.
    :type clusters: list
    
    :returns: colorm : list
        A list of colors obtained from matplotlib colormap cm.hsv. The
        length of 'colorm' is the same as the number of distinct
        clusters.
    """
    import matplotlib.cm as cm
    
    n = len(set(clusters))
    colorm = [cm.hsv(i * 1.0 /n, 1) for i in xrange(n)]
    return colorm
dataset/ETHPy150Open inpho/vsm/vsm/extensions/clustering/plotting.py/gen_colors/original