code: def test_onset_strength_audio(
      ysr,
      feature,
      n_fft,
      hop_length,
      lag,
      max_size,
      detrend,
      center,
      aggregate,
  ):
      y, sr = ysr
      oenv = librosa.onset.onset_strength(
          y=y,
          sr=sr,
          S=None,
          detrend=detrend,
          center=center,
          aggregate=aggregate,
          feature=feature,
          n_fft=n_fft,
          hop_length=hop_length,
          lag=lag,
          max_size=max_size,
      )
  
      assert oenv.ndim == 1
  
      S = librosa.feature.melspectrogram(
          y=y, n_fft=n_fft, hop_length=hop_length
      )
  
      target_shape = S.shape[-1]
  
      if not detrend:
          assert np.all(oenv >= 0)
  
      assert oenv.shape[-1] == target_shape
  
imports: import pytest
  from contextlib import nullcontext
  import os
  import warnings
  import numpy
  import librosa
  from test_core import srand
label_desc: Use image node_id 2 for calling a global function with example usage: test_onset_strength_audio(ysr, feature, n_fft, hop_length, lag, max_size, detrend, center, aggregate) without return types