code: def test_plp(
      ysr,
      hop_length,
      win_length,
      tempo_min,
      tempo_max,
      use_onset,
      prior,
      ctx,
  ):
      y, sr = ysr
      oenv = librosa.onset.onset_strength(
          y=y, sr=sr, hop_length=hop_length
      )
  
      with ctx:
          if use_onset:
              pulse = librosa.beat.plp(
                  y=y,
                  sr=sr,
                  onset_envelope=oenv,
                  hop_length=hop_length,
                  win_length=win_length,
                  tempo_min=tempo_min,
                  tempo_max=tempo_max,
                  prior=prior,
              )
          else:
              pulse = librosa.beat.plp(
                  y=y,
                  sr=sr,
                  hop_length=hop_length,
                  win_length=win_length,
                  tempo_min=tempo_min,
                  tempo_max=tempo_max,
                  prior=prior,
              )
  
          assert len(pulse) == len(oenv)
  
          assert np.all(pulse >= 0)
          assert np.all(pulse <= 1)
  
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 14 for calling a global function with example usage: test_plp(ysr, hop_length, win_length, tempo_min, tempo_max, use_onset, prior, ctx) without return types