code: def energy(ysr, hop, request):
      y, sr = ysr
      if request.param:
          return librosa.onset.onset_strength(
              y=y, sr=sr, hop_length=hop
          )
      else:
          return librosa.feature.rms(y=y, hop_length=hop)
  
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 17 for calling a global function with example usage: energy(ysr, hop, request) and returns: librosa, librosa