class_docstr: Object that performs k-means clustering and manages the centroids.
  The `Kmeans` class is essentially a wrapper around the C++ `Clustering` object.
  
  Parameters
  ----------
  d : int
     dimension of the vectors to cluster
  k : int
     number of clusters
  gpu: bool or int, optional
     False: don't use GPU
     True: use all GPUs
     number: use this many GPUs
  progressive_dim_steps:
      use a progressive dimension clustering (with that number of steps)
  
  Subsequent parameters are fields of the Clustring object. The most important are:
  
  niter: int, optional
     clustering iterations
  nredo: int, optional
     redo clustering this many times and keep best
  verbose: bool, optional
  spherical: bool, optional
     do we want normalized centroids?
  int_centroids: bool, optional
     round centroids coordinates to integer
  seed: int, optional
     seed for the random number generator
code: def assign(self, x):
      x = np.ascontiguousarray(x, dtype="float32")
      assert self.centroids is not None, "should train before assigning"
      self.index.reset()
      self.index.add(self.centroids)
      D, I = self.index.search(x, 1)
      return D.ravel(), I.ravel()
  
imports: import numpy
  from faiss.loader import *
  import faiss
  import collections.abc
label_desc: Use image node_id 5 for calling the Kmeans obj's underlying member method code with example usage: obj.assign(x) and returns: D,  I