code: def testRegression(self):
      audio = MonoLoader(
          filename=join(
              testdata.audio_dir, "recorded", "techno_loop.wav"
          )
      )()
      expectedEstimate = 125
      estimate = PercivalBpmEstimator()(audio)
  
      # Tolerance tuned to 0.1 based on emperical test resulting in BPM = 125.28
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
      # prints 125.28408813476562
  
      # Define Markers for significant meaningful subsections
      # to give proportional relationship with audio length.
      # Similart strategy used for  LoopBpmEstimator()-
      len90 = int(0.9 * len(audio))  # End point for 90% of loop
      len75 = int(0.75 * len(audio))  # 75% point
      len50 = int(0.5 * len(audio))  # mid point
  
      # If any future changes break these asserts,
      # then this will indicates something in algorithm has changed.
      expectedEstimate = 124.9
      estimate = PercivalBpmEstimator()(audio[0:len90])
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
      # prints 124.90558624267578
      estimate = PercivalBpmEstimator()(audio[5000:len75])
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
      # prints 124.90558624267578
      estimate = PercivalBpmEstimator()(audio[0:len50])
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
file_path: essentia/test/src/unittests/rhythm/test_percivalbpmestimator.py
imports: from essentia_test import *
  from essentia.standard import MonoLoader, PercivalBpmEstimator
label_desc: Use image node_id 2 for calling the TestPercivalBpmEstimator obj's underlying member method code with example usage: obj.testRegression() without return types