code: def test_mne_c_design(tmp_path):
      """Test MNE-C filter design."""
      temp_fname = tmp_path / "test_raw.fif"
      out_fname = tmp_path / "test_c_raw.fif"
      x = np.zeros((1, 10001))
      x[0, 5000] = 1.0
      time_sl = slice(5000 - 4096, 5000 + 4097)
      sfreq = 1000.0
      RawArray(x, create_info(1, sfreq, "eeg")).save(temp_fname)
  
      tols = dict(rtol=1e-4, atol=1e-4)
      cmd = (
          "mne_process_raw",
          "--projoff",
          "--raw",
          temp_fname,
          "--save",
          out_fname,
      )
      run_subprocess(cmd)
      h = design_mne_c_filter(sfreq, None, 40)
      h_c = read_raw_fif(out_fname)[0][0][0][time_sl]
      assert_allclose(h, h_c, **tols)
  
      run_subprocess(cmd + ("--highpass", "5", "--highpassw", "2.5"))
      h = design_mne_c_filter(sfreq, 5, 40, 2.5)
      h_c = read_raw_fif(out_fname)[0][0][0][time_sl]
      assert_allclose(h, h_c, **tols)
  
      run_subprocess(cmd + ("--lowpass", "1000", "--highpass", "10"))
      h = design_mne_c_filter(sfreq, 10, None, verbose=True)
      h_c = read_raw_fif(out_fname)[0][0][0][time_sl]
      assert_allclose(h, h_c, **tols)
  
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 2 for calling a global function with example usage: test_mne_c_design(tmp_path) without return types