code: def test_onset_detect_inplace_normalize():
      # This test will fail if the in-place normalization modifies
      # the input onset envelope
      oenv_in = np.ones(50)
      oenv_in[10] = 2
      oenv_orig = oenv_in.copy()
  
      librosa.onset.onset_detect(onset_envelope=oenv_in, normalize=True)
  
      assert (
          np.allclose(oenv_in, oenv_orig) and oenv_in is not oenv_orig
      )
  
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 22 for calling a global function with example usage: test_onset_detect_inplace_normalize() without return types