def _get_variance(color_count: dict, average: float) -> float:
    """
    Compute the variance
    :param color_count: Number of each color in the tile
    :param average: Average pixel color in the tile
    :return: Variance
    """
    variance = 0.0
    for pixel in color_count:
        a = pixel - average
        variance += color_count[pixel] * a * a
    return variance