code: def train_kmeans(kmeans_model, features_batch):
      start_time = time.time()
      kmeans_model.fit(features_batch)
      time_taken = round((time.time() - start_time) // 60, 2)
      return kmeans_model, time_taken
  
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 4 for calling a global function with example usage: train_kmeans(kmeans_model, features_batch) and returns: kmeans_model,  time_taken