code: def __call__(self, x):
      if isinstance(x, torch.Tensor):
          x = x.to(self.C.device)
          dist = (
              x.pow(2).sum(1, keepdim=True)
              - 2 * torch.matmul(x, self.C)
              + self.Cnorm
          )
          return dist.argmin(dim=1).cpu().numpy()
      else:
          dist = (
              (x**2).sum(1, keepdims=True)
              - 2 * np.matmul(x, self.C_np)
              + self.Cnorm_np
          )
          return np.argmin(dist, axis=1)
  
file_path: espnet/egs2/yesno/asr1/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 2 for calling the ApplyKmeans obj's underlying member method code with example usage: obj.__call__(x) and returns: dist, np