code: def testRegressionVariableTempoImpulse(self):
      # file with a variable click track:
      # 0-20s: 120bpm
      # 20-40s: 240bpm
      # 20-60s: 180bpm
      filename = join(
          testdata.audio_dir,
          "generated",
          "synthesised",
          "beat_120_240_180.wav",
      )
      pool = self.computeBpmHistogram(
          self.computeNoveltyCurve(filename),
          zeroPadding=1,
          frameRate=44100.0 / 512.0,
      )
      # as 120 and 240 are harmonics, the algorithm will just throw the
      # lowest, i.e. 120 and also 180 as 120 are not pure harmonics, although
      # they are both harmonics of 60...
      expectedBpm = 240
      self.assertAlmostEqual(int(pool["bpm"]), expectedBpm, 1)
  
      # test that all candidates are multiples of 60:
      for bpm in pool["bpmCandidates"]:
          k = bpm / 60.0
          self.assertTrue(fabs(k - int(k)) < 0.1)
  
      # check that the tempogram reflects the variation of the tempo:
      expectedMaxTempos = [
          120,
          120,
          120,
          120,
          120,
          120,
          120,
          240,
          240,
          240,
          240,
          240,
          240,
          240,
          180,
          180,
          180,
          180,
          180,
          180,
          180,
      ]
      maxTempos = []
      for tempogram in pool["tempogram"][0]:
          maxTempos.append(argmax(tempogram))
      self.assertAlmostEqualVector(maxTempos, expectedMaxTempos, 1)
  
file_path: essentia/test/src/unittests/rhythm/test_bpmhistogram.py
imports: from essentia_test import *
  import essentia
  from essentia import Pool
  from essentia.standard import *
  import essentia.streaming
  from math import ceil, fabs
  from numpy import argmax
label_desc: Use image node_id 6 for calling the TestBpmHistogram obj's underlying member method code with example usage: obj.testRegressionVariableTempoImpulse() without return types