code: def test_resample(art_warning, audio_batch, mocker):
      try:
          test_input, test_output, sr_orig, sr_new = audio_batch
  
          mocker.patch("resampy.resample", autospec=True)
          resampy.resample.return_value = test_input[:, :, :sr_new]
  
          resampler = Resample(
              sr_original=sr_orig, sr_new=sr_new, channels_first=True
          )
          assert resampler(test_input)[0].shape == test_output.shape
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/defences/preprocessor/test_resample.py
imports: import logging
  import numpy
  import pytest
  import resampy
  from art.defences.preprocessor import Resample
  from tests.utils import ARTTestException
label_desc: Use image node_id 5 for calling a global function with example usage: test_resample(art_warning, audio_batch, mocker) without return types