code: def test_beat_no_onsets():
      sr = 22050
      hop_length = 512
      duration = 30
  
      onsets = np.zeros(duration * sr // hop_length)
  
      tempo, beats = librosa.beat.beat_track(
          onset_envelope=onsets, sr=sr, hop_length=hop_length
      )
  
      assert np.allclose(tempo, 0)
      assert len(beats) == 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 5 for calling a global function with example usage: test_beat_no_onsets() without return types