code: def __init__(self, km_path):
      self.km_model = joblib.load(km_path)
      self.C_np = self.km_model.cluster_centers_.transpose()
      self.Cnorm_np = (self.C_np**2).sum(0, keepdims=True)
  
      self.C = torch.from_numpy(self.C_np)
      self.Cnorm = torch.from_numpy(self.Cnorm_np)
      if torch.cuda.is_available():
          self.C = self.C.cuda()
          self.Cnorm = self.Cnorm.cuda()
  
file_path: fairseq/examples/hubert/simple_kmeans/dump_km_label.py
imports: import logging
  import os
  import sys
  import numpy
  import joblib
  import torch
  import tqdm
label_desc: Use image node_id 1 to create a new ApplyKmeans object from inherited base classes: object with example: obj = ApplyKmeans(km_path)