code: def test_resample(self):
      # method must chose ffmpeg loader
      signal, sample_rate = load_audio_file(
          stereo_sample_file, sample_rate=22050
      )
      self.assertTrue(sample_rate == 22050)
      # avconv does round differently, thus allow atol=1
      # result: [[33, 38], [33, 33], [36, 31], [35, 35], [32, 35]]
      self.assertTrue(
          np.allclose(
              signal[:5],
              [[34, 38], [32, 33], [37, 31], [35, 35], [32, 34]],
              atol=1,
          )
      )
      # also downmix
      signal, sample_rate = load_audio_file(
          stereo_sample_file, sample_rate=22050, num_channels=1
      )
      self.assertTrue(
          np.allclose(signal[:5], [36, 33, 34, 35, 33], atol=1)
      )
      # avconv results in a different length of 91450 samples
      self.assertTrue(np.allclose(len(signal), 91460, atol=10))
  
imports: from __future__ import absolute_import, division, print_function
  import io
  import unittest
  from os.path import join
  from madmom.io.audio import *
  from .None import AUDIO_PATH, DATA_PATH
label_desc: Use image node_id 8 for calling the TestLoadAudioFileFunction obj's underlying member method code with example usage: obj.test_resample() without return types