code: def testRegression(self):
      audio = MonoLoader(
          filename=join(
              testdata.audio_dir, "recorded", "techno_loop.wav"
          )
      )()
  
      expectedEstimate = 125
      estimate = LoopBpmEstimator(confidenceThreshold=0.95)(audio)
      self.assertEqual(expectedEstimate, estimate)
  
      # Test for upperbound of Confidence Threshold
      estimate = LoopBpmEstimator(confidenceThreshold=1)(audio)
      self.assertEqual(expectedEstimate, estimate)
  
      # Test for lowerbound of Confidence Threshold
      estimate = LoopBpmEstimator(confidenceThreshold=0)(audio)
      self.assertEqual(expectedEstimate, estimate)
  
      # Define Markers for significant meaningful subsections
      # consistent with sampling rate
      len90 = int(0.9 * len(audio))  # End point for 90% loop
      len50 = int(0.5 * len(audio))  # Mid point
      len01 = int(0.01 * len(audio))  # Begin point for subsection loop
  
      # If any future changes break these asserts,
      # then this will indicate algorithm is compromised
      # First test with default confidence value (0.95)
      # Margin of 0.1 chosen based on accuracy of observed BPMs.
  
      # Loop is broken at end, we expect zero output
      estimate = LoopBpmEstimator()(audio[0:len90])
      self.assertEqual(0, estimate)
  
      # Loop is broken at beginning and end, we expect zero output.
      estimate = LoopBpmEstimator()(audio[len01:len90])
      self.assertEqual(0, estimate)
  
      # When the loop is halved we get close to the expected estimate to 1 place of decimal.
      estimate = LoopBpmEstimator()(audio[0:len50])
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
      # Repeat above tests with non-default confidence value of 0.5.
      # Loop is broken at end, we expect zero output
      estimate = LoopBpmEstimator(confidenceThreshold=0.5)(
          audio[0:len90]
      )
      self.assertEqual(0, estimate)
  
      # Lower confidence, results in value close to expected estimate.
      estimate = LoopBpmEstimator(confidenceThreshold=0.5)(
          audio[len01:len90]
      )
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
      # Lower confidence, results in value close to expected estimate.
      estimate = LoopBpmEstimator(confidenceThreshold=0.5)(
          audio[0:len50]
      )
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
      # Repeat above tests with non-default confidence value of 0.2.
      # Loop is broken at end, we expect zero output
      estimate = LoopBpmEstimator(confidenceThreshold=0.2)(
          audio[0:len90]
      )
      self.assertEqual(0, estimate)
  
      # Lower confidence, results in value close to expected estimate.
      estimate = LoopBpmEstimator(confidenceThreshold=0.2)(
          audio[len01:len90]
      )
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
      # Lower confidence, results in value close to expected estimate.
      estimate = LoopBpmEstimator(confidenceThreshold=0.2)(
          audio[0:len50]
      )
      self.assertAlmostEqual(expectedEstimate, estimate, 0.1)
  
file_path: essentia/test/src/unittests/rhythm/test_loopbpmestimator.py
imports: from essentia_test import *
  from essentia.standard import MonoLoader, LoopBpmEstimator
  import numpy
label_desc: Use image node_id 2 for calling the TestLoopBpmEstimator obj's underlying member method code with example usage: obj.testRegression() without return types