code: def get_parser():
      parser = argparse.ArgumentParser(
          description="Learn K-means clustering over acoustic features."
      )
  
      # Features arguments
      parser.add_argument(
          "--in_features_path",
          type=str,
          default=None,
          help="Features file path",
      )
      parser.add_argument(
          "--feature_type",
          type=str,
          choices=["logmel", "hubert", "w2v2", "cpc"],
          default=None,
          help="Acoustic feature type",
      )
      parser.add_argument(
          "--manifest_path",
          type=str,
          default=None,
          help="Manifest file containing the root dir and file names",
      )
      parser.add_argument(
          "--out_features_path",
          type=str,
          default=None,
          help="Features file path to write to",
      )
      parser.add_argument(
          "--checkpoint_path",
          type=str,
          help="Pretrained acoustic model checkpoint",
      )
      parser.add_argument(
          "--layer",
          type=int,
          help="The layer of the pretrained model to extract features from",
          default=-1,
      )
      parser.add_argument(
          "--sample_pct",
          type=float,
          help="Percent data to use for K-means training",
          default=0.1,
      )
  
      # K-means arguments
      parser.add_argument(
          "--num_clusters",
          type=int,
          help="Nubmer of clusters",
          default=50,
      )
      parser.add_argument("--init", default="k-means++")
      parser.add_argument(
          "--max_iter",
          type=int,
          help="Maximum number of iterations for K-means training",
          default=150,
      )
      parser.add_argument(
          "--batch_size",
          type=int,
          help="Batch size for K-means training",
          default=10000,
      )
      parser.add_argument("--tol", default=0.0, type=float)
      parser.add_argument("--max_no_improvement", default=100, type=int)
      parser.add_argument("--n_init", default=20, type=int)
      parser.add_argument(
          "--reassignment_ratio", default=0.5, type=float
      )
      parser.add_argument(
          "--out_kmeans_model_path",
          type=str,
          required=True,
          help="Path to save K-means model",
      )
  
      # Leftovers
      parser.add_argument(
          "--seed",
          type=int,
          help="Random seed to use for K-means training",
          default=1369,
      )
  
      return parser
  
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 2 for calling a global function with example usage: get_parser() and returns: parser