code: def test_resample(method):
      """Test resampling."""
      rng = np.random.RandomState(0)
      x = rng.normal(0, 1, (10, 10, 10))
      with catch_logging() as log:
          x_rs = resample(x, 1, 2, npad=10, method=method, verbose=True)
      log = log.getvalue()
      if method == "fft":
          assert "neighborhood" not in log
      else:
          assert "neighborhood" in log
      assert x.shape == (10, 10, 10)
      assert x_rs.shape == (10, 10, 5)
  
      x_2 = x.swapaxes(0, 1)
      x_2_rs = resample(x_2, 1, 2, npad=10, method=method)
      assert_array_equal(x_2_rs.swapaxes(0, 1), x_rs)
  
      x_3 = x.swapaxes(0, 2)
      x_3_rs = resample(x_3, 1, 2, npad=10, axis=0, method=method)
      assert_array_equal(x_3_rs.swapaxes(0, 2), x_rs)
  
      # make sure we cast to array if necessary
      assert_array_equal(
          resample([0.0, 0.0], 2, 1), [0.0, 0.0, 0.0, 0.0]
      )
  
imports: import numpy
  import pytest
  from numpy.fft import fft, fftfreq
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, assert_array_less
  from scipy.signal import butter, freqz, sosfreqz
  from scipy.signal import resample
  from mne import Epochs, create_info
  from mne._fiff.pick import _DATA_CH_TYPES_SPLIT
  from mne.filter import _length_factors, _overlap_add_filter, _resample_stim_channels, _smart_pad, construct_iir_filter, create_filter, design_mne_c_filter, detrend, estimate_ringing_samples, filter_data, notch_filter, resample
  from mne.io import RawArray, read_raw_fif
  from mne.utils import catch_logging, requires_mne, run_subprocess, sum_squared
label_desc: Use image node_id 8 for calling a global function with example usage: test_resample(method) without return types