code: def test_resample_scipy():
      """Test resampling against SciPy."""
      n_jobs_test = (1, "cuda")
      for window in ("boxcar", "hann"):
          for N in (100, 101, 102, 103):
              x = np.arange(N).astype(float)
              err_msg = "%s: %s" % (N, window)
              x_2_sp = sp_resample(x, 2 * N, window=window)
              for n_jobs in n_jobs_test:
                  x_2 = resample(
                      x, 2, 1, npad=0, window=window, n_jobs=n_jobs
                  )
                  assert_allclose(
                      x_2, x_2_sp, atol=1e-12, err_msg=err_msg
                  )
              new_len = int(round(len(x) * (1.0 / 2.0)))
              x_p5_sp = sp_resample(x, new_len, window=window)
              for n_jobs in n_jobs_test:
                  x_p5 = resample(
                      x, 1, 2, npad=0, window=window, n_jobs=n_jobs
                  )
                  assert_allclose(
                      x_p5, x_p5_sp, atol=1e-12, err_msg=err_msg
                  )
  
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 9 for calling a global function with example usage: test_resample_scipy() without return types