code: def spectral_variation(signal, fs):
      """Computes the amount of variation of the spectrum along time.
  
      Spectral variation is computed from the normalized cross-correlation between two consecutive amplitude spectra.
  
      Description and formula in Article:
      The Timbre Toolbox: Extracting audio descriptors from musicalsignals
      Authors Peeters G., Giordano B., Misdariis P., McAdams S.
  
      Feature computational cost: 1
  
      Parameters
      ----------
      signal : nd-array
          Signal from which spectral variation is computed.
      fs : float
          Sampling frequency
  
      Returns
      -------
      float
          Spectral Variation
  
      """
      f, fmag = calc_fft(signal, fs)
  
      sum1 = np.sum(np.array(fmag)[:-1] * np.array(fmag)[1:])
      sum2 = np.sum(np.array(fmag)[1:] ** 2)
      sum3 = np.sum(np.array(fmag)[:-1] ** 2)
  
      if not sum2 or not sum3:
          variation = 1
      else:
          variation = 1 - (sum1 / ((sum2**0.5) * (sum3**0.5)))
  
      return variation
  
imports: import scipy.signal
  from tsfel.feature_extraction.features_utils import *
label_desc: Use image node_id 47 for calling a global function with example usage: spectral_variation(signal, fs) and returns: variation