code: def spectral_flux(fft_magnitude, previous_fft_magnitude):
      """
      Computes the spectral flux feature of the current frame
      ARGUMENTS:
          fft_magnitude:            the abs(fft) of the current frame
          previous_fft_magnitude:        the abs(fft) of the previous frame
      """
      # compute the spectral flux as the sum of square distances:
      fft_sum = np.sum(fft_magnitude + eps)
      previous_fft_sum = np.sum(previous_fft_magnitude + eps)
      sp_flux = np.sum(
          (
              fft_magnitude / fft_sum
              - previous_fft_magnitude / previous_fft_sum
          )
          ** 2
      )
  
      return sp_flux
  
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 7 for calling a global function with example usage: spectral_flux(fft_magnitude, previous_fft_magnitude) and returns: sp_flux