code: def __init__(self, km_path, use_gpu):
      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 use_gpu and torch.cuda.is_available():
          self.C = self.C.cuda()
          self.Cnorm = self.Cnorm.cuda()
  
file_path: espnet/egs2/dns_ins20/enh1/pyscripts/feats/dump_km_label.py
imports: import argparse
  import logging
  import os
  import sys
  import joblib
  import numpy
  import torch
  from ssl_feature_utils import ESPnetHubertFeatureReader, HubertFeatureReader, MfccFeatureReader, S3PRLFeatureReader, build_data_iterator, format_feature_conf_str
  from espnet2.utils.types import str2bool
  from espnet.utils.cli_readers import file_reader_helper
  from espnet.utils.cli_writers import file_writer_helper
label_desc: Use image node_id 1 to create a new ApplyKmeans object from inherited base classes: object with example: obj = ApplyKmeans(km_path, use_gpu)