code: def assert_high_frequency_energy_absence(
      audio_array,
      sample_rate,
      frequency_threshold: float = 10_000.0,
      energy_threshold: float = 0.15,
  ):
      spectrum = np.fft.rfft(audio_array)
      freqs = np.fft.rfftfreq(len(audio_array), 1 / sample_rate)
      assert np.all(
          np.abs(spectrum[freqs > frequency_threshold])
          < energy_threshold
      ), "Detected energy in frequencies above the given frequency_threshold!"
  
imports: from copy import deepcopy
  import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from audiomentations import Gain, AdjustDuration, RepeatPart, Shift
  from audiomentations.core.utils import get_crossfade_mask_pair
  from tests.test_filter_transforms import get_chirp_test
label_desc: Use image node_id 2 for calling a global function with example usage: assert_high_frequency_energy_absence(audio_array, sample_rate, frequency_threshold, energy_threshold) without return types