code: def color_quantize(x, clusters):
      x = x.reshape(-1, 3)
      d = squared_euclidean_distance(x, clusters)
      return np.argmin(d, axis=1)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/src/transformers/models/imagegpt/feature_extraction_imagegpt.py
imports: from typing import List, Optional, Union
  import numpy
  from PIL import Image
  from transformers.image_utils import PILImageResampling
  from ...feature_extraction_utils import BatchFeature, FeatureExtractionMixin
  from ...image_utils import ImageFeatureExtractionMixin, is_torch_tensor
  from ...utils import TensorType, logging
label_desc: Use image node_id 2 for calling a global function with example usage: color_quantize(x, clusters) and returns: np