code: def test_sensors_inside_bem():
      """Test that sensors inside the BEM are problematic."""
      rr = _get_ico_surface(1)["rr"]
      rr /= np.linalg.norm(rr, axis=1, keepdims=True)
      rr *= 0.1
      assert len(rr) == 42
      info = create_info(len(rr), 1000.0, "mag")
      info["dev_head_t"] = Transform("meg", "head", np.eye(4))
      for ii, ch in enumerate(info["chs"]):
          ch["loc"][:] = np.concatenate((rr[ii], np.eye(3).ravel()))
      trans = Transform("head", "mri", np.eye(4))
      trans["trans"][2, 3] = 0.03
      sphere_noshell = make_sphere_model((0.0, 0.0, 0.0), None)
      sphere = make_sphere_model((0.0, 0.0, 0.0), 1.01)
      with pytest.raises(
          RuntimeError, match=".* 15 MEG.*inside the scalp.*"
      ):
          make_forward_solution(info, trans, fname_src, fname_bem)
      make_forward_solution(
          info, trans, fname_src, fname_bem_meg
      )  # okay
      make_forward_solution(
          info, trans, fname_src, sphere_noshell
      )  # okay
      with pytest.raises(
          RuntimeError, match=".* 42 MEG.*outermost sphere sh.*"
      ):
          make_forward_solution(info, trans, fname_src, sphere)
      sphere = make_sphere_model(
          (0.0, 0.0, 2.0), 1.01
      )  # weird, but okay
      make_forward_solution(info, trans, fname_src, sphere)
      for ch in info["chs"]:
          ch["loc"][:3] *= 0.1
      with pytest.raises(
          RuntimeError, match=".* 42 MEG.*the inner skull.*"
      ):
          make_forward_solution(info, trans, fname_src, fname_bem_meg)
  
imports: from itertools import product
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_array_less
  from mne import convert_forward_solution, create_info, get_volume_labels_from_aseg, make_forward_solution, make_sphere_model, pick_info, pick_types, pick_types_forward, read_cov, read_dipole, read_evokeds, read_forward_solution, read_source_spaces, setup_volume_source_space, write_forward_solution
  from mne._fiff.constants import FIFF
  from mne.bem import make_bem_solution, read_bem_surfaces
  from mne.channels import make_standard_montage
  from mne.datasets import testing
  from mne.dipole import Dipole, fit_dipole
  from mne.forward import Forward, _do_forward_solution, use_coil_def
  from mne.forward._compute_forward import _magnetic_dipole_field_vec
  from mne.forward._make_forward import _create_meg_coils, make_forward_dipole
  from mne.forward.tests.test_forward import assert_forward_allclose
  from mne.io import read_info, read_raw_bti, read_raw_fif, read_raw_kit
  from mne.simulation import simulate_evoked
  from mne.source_estimate import VolSourceEstimate
  from mne.source_space._source_space import _compare_source_spaces, setup_source_space, write_source_spaces
  from mne.surface import _get_ico_surface
  from mne.transforms import Transform
  from mne.utils import catch_logging, requires_mne, requires_mne_mark, requires_openmeeg_mark, run_subprocess
label_desc: Use image node_id 18 for calling a global function with example usage: test_sensors_inside_bem() without return types