code: def doubleTrapezium(self):
      sr = 44100
      frameRate = sr / hopsize  # frames per second
      length = 20  # 20 seconds
      size = int(ceil(length * frameRate))  # size in (hop)frames
      fadelength = int(5.0 * frameRate)  # 5 second aprox
      cutoffHigh = 0.85
      cutoffLow = 0.2
  
      # trapezoidal input:
      rms = [0] * size
      for i in range(fadelength):
          rms[i] = 4.0 * i / float(size)
      for i in range(fadelength, size - fadelength):
          rms[i] = 1.0
      for i in range(size - fadelength, size):
          rms[i] = 4.0 * (size - i) / float(size)
      rms += rms
      meanRms = mean(rms)
      fadeDetection = FadeDetection(
          frameRate=frameRate,
          cutoffHigh=cutoffHigh,
          cutoffLow=cutoffLow,
      )
      foundFadeIn, foundFadeOut = fadeDetection(rms)
  
      fadeInStop = ceil(fadelength * cutoffHigh * meanRms) / frameRate
      fadeOutStart = length - fadeInStop
      expectedFadeIn = [[0, fadeInStop], [length, length + fadeInStop]]
      expectedFadeOut = [
          [fadeOutStart, length],
          [2 * length - fadeInStop, 2 * length],
      ]
  
      self.assertAlmostEqualMatrix(foundFadeIn, expectedFadeIn, 1e-3)
      self.assertAlmostEqualMatrix(foundFadeOut, expectedFadeOut, 1e-3)
  
file_path: essentia/test/src/unittests/highlevel/test_fadedetection.py
imports: from numpy import *
  from essentia_test import *
label_desc: Use image node_id 5 for calling the TestFadeDetection obj's underlying member method code with example usage: obj.doubleTrapezium() without return types