code: def calculate_mfccs(
      audio: torch.Tensor,
      sampling_rate: float,
      num_mfccs: int,
      window_length: float = 0.023,
  ) -> torch.Tensor:
      """Calculate MFCCs on a batch of data.
  
      Args:
          audio: the audio signal, in [batch_size, num_channels, temporal_size]
              order.
          sampling_rate: the sampling rate of the audio signal.
          num_mfccs: the number of coefficients to use.
          window_length: the window length used for computing the spectrogram. By
              default, we choose 23ms, which is a good value for human speech.
      """
      if audio.dim() != 3:
          raise ValueError(f"Expected 3 dimensions, got {audio.dim()}")
  
      spectrogram_length = get_mfccs(
          audio[0][0],
          sampling_rate,
          num_mfccs,
          window_length=window_length,
      ).shape[1]
  
      result = torch.empty(
          [
              audio.shape[0],
              audio.shape[1],
              num_mfccs,
              spectrogram_length,
          ],
          device=audio.device,
          dtype=audio.dtype,
      )
  
      for i, element in enumerate(audio):
          for j, channel in enumerate(element):
              mfccs = get_mfccs(
                  channel,
                  sampling_rate,
                  num_mfccs,
                  window_length=window_length,
              )
              result[i, j] = mfccs
      return result
  
imports: import math
  import torch
  from utils import logger
label_desc: Use image node_id 2 for calling a global function with example usage: calculate_mfccs(audio, sampling_rate, num_mfccs, window_length) and returns: result