code: def testRegression(self):
      # Regression tests on calculation of the positions and Peaks.
      inputSize = 21168  # N.B The beat period is 21168 samples for 125 bpm @ 44.1k samp. rate
      audio = MonoLoader(
          filename=join(
              testdata.audio_dir, "recorded", "techno_loop.wav"
          )
      )()
  
      # Calculates the positions and Peaks
      pdetect = PeakDetection()
  
      # Calculates the OSS
      fc = FrameCutter(frameSize=inputSize, hopSize=inputSize)
      windower = Windowing(type="blackmanharris62")
      specAlg = Spectrum(size=4096)
      fluxAlg = Flux()
  
      # Calculate the average flux over all frames of audio
      frame = fc(audio)
      fluxArray = []
  
      for frame in FrameGenerator(
          audio, frameSize=inputSize, hopSize=inputSize
      ):
          spectrum = specAlg(windower(frame))
          fluxArray.append(fluxAlg(spectrum))
          frame = fc(audio)
      filteredSignal = LowPass(cutoffFrequency=8000)(fluxArray)
  
      # Calculate PercivalEvaluatePulseTrains on fluxArray
      aSignal = AutoCorrelation()(fluxArray)
      pHarm = PercivalEnhanceHarmonics()(aSignal)
      oss, posis = pdetect(pHarm)
      lag = PercivalEvaluatePulseTrains()(fluxArray, posis)
      # Based on previous observations with fluxArray output originating from techno_loop
      self.assertEqual(8.0, lag)
  
      # Calculate PercivalEvaluatePulseTrains on filtered fluxArray
      aSignal = AutoCorrelation()(filteredSignal)
      pHarm = PercivalEnhanceHarmonics()(aSignal)
      oss, posis = pdetect(pHarm)
      lag = PercivalEvaluatePulseTrains()(filteredSignal, posis)
      # Based on previous observations with ffiltered luxArray output originating from techno_loop
      self.assertEqual(7.0, lag)
  
file_path: essentia/test/src/unittests/rhythm/test_percivalevaluatepulsetrains.py
imports: from essentia_test import *
  from essentia.standard import MonoLoader, PercivalEvaluatePulseTrains, HarmonicBpm, FrequencyBands, NoveltyCurve
label_desc: Use image node_id 4 for calling the TestPercivalEvaluatePulseTrains obj's underlying member method code with example usage: obj.testRegression() without return types