code: def spectral_rolloff(signal, c):
      """Computes spectral roll-off"""
      energy = np.sum(signal**2)
      fft_length = len(signal)
      threshold = c * energy
      # Ffind the spectral rolloff as the frequency position
      # where the respective spectral energy is equal to c*totalEnergy
      cumulative_sum = np.cumsum(signal**2) + eps
      a = np.nonzero(cumulative_sum > threshold)[0]
      if len(a) > 0:
          sp_rolloff = np.float64(a[0]) / (float(fft_length))
      else:
          sp_rolloff = 0.0
      return sp_rolloff
  
imports: from __future__ import print_function
  import math
  import numpy
  import sys
  from scipy.fftpack import fft
  import matplotlib.pyplot
  from scipy.signal import lfilter
  from scipy.fftpack.realtransforms import dct
  from tqdm import tqdm
label_desc: Use image node_id 8 for calling a global function with example usage: spectral_rolloff(signal, c) and returns: sp_rolloff