code: def testRegression(self):
      # Simple regression test, comparing normal behaviour
      sampleRate = 44100
      melFrameSize = 8192
      melHopSize = 1024
      rtFrameSize = 256
      rtHopSize = 32
      audio = MonoLoader(
          filename=join(
              testdata.audio_dir, "recorded", "techno_loop.wav"
          ),
          sampleRate=sampleRate,
      )()
  
      w = Windowing(type="blackmanharris62")
      spectrum = Spectrum()
      melbands = MelBands(
          sampleRate=sampleRate,
          numberBands=40,
          lowFrequencyBound=0,
          highFrequencyBound=sampleRate / 2,
      )
  
      pool = Pool()
      for frame in FrameGenerator(
          audio=audio,
          frameSize=melFrameSize,
          hopSize=melHopSize,
          startFromZero=True,
      ):
          pool.add("melbands", melbands(spectrum(w(frame))))
  
      # print("Mel band frames: %d" % len(pool['melbands']))
      # print("Rhythm transform frames: %d" % int(len(pool['melbands']) / 32))
  
      rhythmtransform = RhythmTransform(
          frameSize=rtFrameSize, hopSize=rtHopSize
      )
      rt = rhythmtransform(pool["melbands"])
  
      # This code stores reference values in a file for later loading.
      # np.save('rhythmtransform.npy', rt)
  
      # Reference samples are loaded as expected values
      expected_rhythmtransform_npy = np.load(
          join(filedir(), "rhythmtransform/rhythmtransform.npy")
      )
  
      # Loop through all Melframes to regression test each one against the file reference values.
      index = 0
      while index < len(expected_rhythmtransform_npy):
          self.assertAlmostEqualVectorFixedPrecision(
              expected_rhythmtransform_npy[index], rt[index], 8
          )
          index += 1
  
file_path: essentia/test/src/unittests/rhythm/test_rhythmtransform.py
imports: from essentia_test import *
  import numpy
label_desc: Use image node_id 2 for calling the TestRhythmTransform obj's underlying member method code with example usage: obj.testRegression() without return types