class_docstr: Internal class that manages partitioning. The ``FakePalettize`` class base classes the ``_Partitioner`` class
  and all the partitioning logic is controlled by this class.
code: def __init__(
      self,
      n_bits: int,
      enforce_zero: bool,
      partition_size: int,
      cluster_dim: int,
      cluster_permute: _Tuple,
      palett_tau: float,
      kmeans_init: str,
      prune_threshold: float,
      kmeans_opt1d_threshold: int,
      add_extra_centroid: bool,
  ):
      self.centroids_init = [kmeans_init]
      if add_extra_centroid:
          self.n_clusters = [2 ** int(n_bits) + 1]
      else:
          self.n_clusters = [2 ** int(n_bits)]
      self.labels_init = [None]
      self.enforce_zero = [enforce_zero]
      self.partitions = []
      self.partition_size = partition_size
      self.cluster_dim = cluster_dim
      self.cluster_permute = cluster_permute
      self.prune_threshold = float(prune_threshold)
  
      self.kmeans_init = kmeans_init
      self.kmeans_opt1d_threshold = kmeans_opt1d_threshold
      self.palett_tau = palett_tau
  
file_path: coremltools/coremltools/optimize/torch/palettization/_partitioner.py
imports: from typing import Tuple
  import torch
  from ._efficient_kmeans import _EfficientKMeans
label_desc: Use image node_id 1 to create a new _Partitioner object  with example: obj = _Partitioner(n_bits, enforce_zero, partition_size, cluster_dim, cluster_permute, palett_tau, kmeans_init, prune_threshold, kmeans_opt1d_threshold, add_extra_centroid)