code: def get_kmeans_model(
      n_clusters,
      init,
      max_iter,
      batch_size,
      tol,
      max_no_improvement,
      n_init,
      reassignment_ratio,
      random_state,
  ):
      return MiniBatchKMeans(
          n_clusters=n_clusters,
          init=init,
          max_iter=max_iter,
          batch_size=batch_size,
          tol=tol,
          max_no_improvement=max_no_improvement,
          n_init=n_init,
          reassignment_ratio=reassignment_ratio,
          random_state=random_state,
          verbose=1,
          compute_labels=True,
          init_size=None,
      )
  
file_path: fairseq/examples/textless_nlp/gslm/speech2unit/clustering/cluster_kmeans.py
imports: import argparse
  import logging
  import os
  import time
  import numpy
  from sklearn.cluster import MiniBatchKMeans
  import joblib
  from examples.textless_nlp.gslm.speech2unit.pretrained.utils import get_and_dump_features, get_features
label_desc: Use image node_id 3 for calling a global function with example usage: get_kmeans_model(n_clusters, init, max_iter, batch_size, tol, max_no_improvement, n_init, reassignment_ratio, random_state) and returns: MiniBatchKMeans