code: def evaluate_class(
      self, transform_class: Callable[..., np.ndarray], fname: str
  ):
      metadata = []
      audio, sample_rate = transform_class(
          self.audios[0], self.sample_rates[0], metadata
      )
  
      self.assertEqual(
          metadata,
          self.metadata[fname],
          "Expected and outputted metadata do not match",
      )
  
      if audio.ndim > 1:
          audio = np.swapaxes(audio, 0, 1)
  
      # we compare the audio arrays loaded in from the audio files rather than the
      # returned audio array and the loaded in audio array because the array is
      # slightly modified during sf.write
      with tempfile.NamedTemporaryFile(suffix=".wav") as tmpfile:
          sf.write(tmpfile.name, audio, sample_rate)
          dst = librosa.load(tmpfile.name, sr=None, mono=False)[0]
  
      ref = self.get_ref_audio(fname)
      self.assertTrue(
          are_equal_audios(dst, ref),
          "Expected and outputted audio do not match",
      )
  
file_path: AugLy/augly/tests/audio_tests/base_unit_test.py
imports: import os
  import tempfile
  import unittest
  from typing import Callable
  import numpy
  from augly.tests import AudioAugConfig
  from augly.utils import pathmgr, TEST_URI
  from augly.utils.libsndfile import install_libsndfile
  import librosa
  import soundfile
label_desc: Use image node_id 4 for calling the BaseAudioUnitTest obj's underlying member method code with example usage: obj.evaluate_class(transform_class, fname) without return types