code: def test_onset_strength(infile):
      DATA = load(infile)
  
      # Compute onset envelope using the same spectrogram
      onsets = librosa.onset.onset_strength(
          y=None,
          sr=8000,
          S=DATA["D"],
          lag=1,
          max_size=1,
          center=False,
          detrend=True,
          aggregate=np.mean,
      )
  
      assert np.allclose(onsets[1:], DATA["onsetenv"][0])
  
imports: import os
  import pytest
  from contextlib import nullcontext
  import numpy
  import scipy.stats
  import librosa
  from test_core import files, load
label_desc: Use image node_id 2 for calling a global function with example usage: test_onset_strength(infile) without return types