code: def extract_feature_mfcc(
      path: str,
      device: torch.device,
      sample_rate: int,
  ) -> Tensor:
      r"""Extract MFCC features for KMeans clustering and pseudo label prediction.
      Args:
          path (str): The file path of the audio.
          device (torch.device): The location to allocate for PyTorch Tensors.
              Options: [``torch.device('cpu')``, torch.device('cuda')``].
          sample_rate (int): The sample rate of the audio.
  
      Returns:
          Tensor: The desired feature tensor of the given audio file.
      """
      waveform, sr = torchaudio.load(path)
      assert sr == sample_rate
      feature_extractor = torchaudio.transforms.MFCC(
          sample_rate=sample_rate,
          n_mfcc=13,
          melkwargs={"n_fft": 400, "hop_length": 160, "center": False},
      ).to(device)
      waveform = waveform[0].to(device)
      mfccs = feature_extractor(waveform)  # (freq, time)
      deltas = torchaudio.functional.compute_deltas(mfccs)
      ddeltas = torchaudio.functional.compute_deltas(deltas)
      concat = torch.cat([mfccs, deltas, ddeltas], dim=0)
      feat = concat.transpose(0, 1)  # (time, freq)
      return feat
  
file_path: audio/examples/hubert/utils/feature_utils.py
imports: import logging
  from pathlib import Path
  from typing import Optional, Tuple, Union
  import torch
  import torchaudio
  from torch import Tensor
  from torch.nn import Module
  from .common_utils import _get_feat_lens_paths
label_desc: Use image node_id 2 for calling a global function with example usage: extract_feature_mfcc(path, device, sample_rate) and returns: feat