def METHOD_NAME(self, rgb_img):
    lab = rgb2lab(rgb_img).reshape((-1, 3))
    min_ind = np.argmin(
        euclidean_distances(lab, self.lab, squared=True), axis=1)
    quantized_lab = self.lab[min_ind]
    img = lab2rgb(quantized_lab.reshape(rgb_img.shape))
    return img