class_docstr: _EfficientKMeans is primarily used by palettization to perform a k-means operation. This class also has an in-house
  implementation of k-means, called ``kmeans_pp`` which runs entirely on GPU and is ~10x faster than sklearn's API.
code: def __init__(
      self,
      n_clusters: int,
      init: str,
      n_init: int = 0,
      labels=None,
      verbose: int = 0,
      max_iter: int = 100,
      tol: float = 0.0001,
      error_bnd: int = 0,
  ):
      self.n_clusters = n_clusters
      self.n_init = n_init
      self.max_iter = max_iter
      self.tol = tol
      self.verbose = verbose
      self.labels_ = labels
      self.inertia_ = None
      self.cluster_centers_ = init
      self.error_bnd = error_bnd
  
      assert self.max_iter > 0
      assert self.n_clusters > 0
  
file_path: coremltools/coremltools/optimize/torch/palettization/_efficient_kmeans.py
imports: import numpy
  import torch
  import torch.distributed
label_desc: Use image node_id 3 to create a new _EfficientKMeans object  with example: obj = _EfficientKMeans(n_clusters, init, n_init, labels, verbose, max_iter, tol, error_bnd)