code: def test_method_str():
      """Test method argument types."""
      raw = read_raw_fif(
          testing_path
          / "MEG"
          / "sample"
          / "sample_audvis_trunc_raw.fif",
          preload=False,
      )
      raw.crop(0, 1).pick(("meg", "eeg"), exclude=()).load_data()
      raw.copy().interpolate_bads(method="MNE")
      with pytest.raises(ValueError, match="Invalid value for the"):
          raw.interpolate_bads(method="spline")
      raw.pick("eeg", exclude=())
      raw.interpolate_bads(method="spline")
  
imports: from itertools import compress
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import Epochs, pick_channels, pick_types, read_events
  from mne._fiff.constants import FIFF
  from mne._fiff.proj import _has_eeg_average_ref_proj
  from mne.channels import make_dig_montage
  from mne.channels.interpolation import _make_interpolation_matrix
  from mne.datasets import testing
  from mne.io import RawArray, read_raw_ctf, read_raw_fif, read_raw_nirx
  from mne.preprocessing.nirs import beer_lambert_law, optical_density, scalp_coupling_index
  from mne.utils import _record_warnings
label_desc: Use image node_id 11 for calling a global function with example usage: test_method_str() without return types