code: def test_downmix(self):
      # test wave loader
      signal, sample_rate = load_audio_file(
          stereo_sample_file, num_channels=1
      )
      self.assertTrue(np.allclose(signal[:5], [35, 35, 31, 33, 33]))
      self.assertTrue(len(signal) == 182919)
      self.assertTrue(sample_rate == 44100)
      self.assertTrue(signal.shape == (182919,))
      # test ffmpeg loader
      signal, sample_rate = load_audio_file(
          stereo_sample_file, num_channels=1
      )
      # results are rounded differently, thus allow atol=1
      self.assertTrue(
          np.allclose(signal[:5], [35, 35, 31, 33, 33], atol=1)
      )
      # avconv results in a different length of 182909 samples
      self.assertTrue(np.allclose(len(signal), 182919, atol=10))
      self.assertTrue(sample_rate == 44100)
      # test clipping
      f = pj(AUDIO_PATH, "stereo_chirp.wav")
      signal, _ = load_audio_file(f, num_channels=1)
      signal_stereo, _ = load_audio_file(f)
      # sanity checks
      self.assertTrue(
          np.allclose(signal_stereo[:, 0], signal_stereo[:, 1])
      )
      self.assertTrue(
          np.allclose(signal_stereo.mean(axis=1), signal_stereo[:, 0])
      )
      # check clipping
      self.assertTrue(np.allclose(signal, signal_stereo[:, 1]))
  
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 6 for calling the TestLoadAudioFileFunction obj's underlying member method code with example usage: obj.test_downmix() without return types