code: def test_spectral_rolloff(infile):
      DATA = load(infile)
  
      y, sr = librosa.load(
          os.path.join("tests", DATA["wavfile"][0]), sr=None, mono=True
      )
  
      n_fft = DATA["nfft"][0, 0].astype(int)
      hop_length = DATA["hop_length"][0, 0].astype(int)
      pct = DATA["pct"][0, 0]
  
      # spectralRolloff uses normalized spectra
      S = met_stft(y, n_fft, hop_length, n_fft, True)
  
      rolloff = librosa.feature.spectral_rolloff(
          S=S,
          sr=sr,
          n_fft=n_fft,
          hop_length=hop_length,
          roll_percent=pct,
      )
  
      assert np.allclose(rolloff, DATA["rolloff"])
  
file_path: librosa/tests/test_met_features.py
imports: import os
  import pytest
  import numpy
  import scipy.io
  import scipy.signal
  from test_core import load, files
  import librosa
label_desc: Use image node_id 4 for calling a global function with example usage: test_spectral_rolloff(infile) without return types