code: def test_helmet():
      """Test loading helmet surfaces."""
      base_dir = Path(__file__).parents[1] / "io"
      fname_raw = base_dir / "tests" / "data" / "test_raw.fif"
      fname_kit_raw = (
          base_dir / "kit" / "tests" / "data" / "test_bin_raw.fif"
      )
      fname_bti_raw = (
          base_dir
          / "bti"
          / "tests"
          / "data"
          / "exported4D_linux_raw.fif"
      )
      fname_ctf_raw = base_dir / "tests" / "data" / "test_ctf_raw.fif"
      fname_trans = (
          base_dir / "tests" / "data" / "sample-audvis-raw-trans.txt"
      )
      trans = _get_trans(fname_trans)[0]
      new_info = read_info(fname_raw)
      artemis_info = new_info.copy()
      for pick in pick_types(new_info, meg=True):
          new_info["chs"][pick]["coil_type"] = 9999
          artemis_info["chs"][pick][
              "coil_type"
          ] = FIFF.FIFFV_COIL_ARTEMIS123_GRAD
      for info, n, name in [
          (read_info(fname_raw), 304, "306m"),
          (read_info(fname_kit_raw), 150, "KIT"),  # Delaunay
          (read_info(fname_bti_raw), 304, "Magnes"),
          (read_info(fname_ctf_raw), 342, "CTF"),
          (new_info, 102, "unknown"),  # Delaunay
          (artemis_info, 102, "ARTEMIS123"),  # Delaunay
      ]:
          with catch_logging() as log:
              helmet = get_meg_helmet_surf(info, trans, verbose=True)
          log = log.getvalue()
          assert name in log
          assert_equal(len(helmet["rr"]), n)
          assert_equal(len(helmet["rr"]), len(helmet["nn"]))
  
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal, assert_equal
  from mne import decimate_surface, dig_mri_distances, get_montage_volume_labels, pick_types, read_surface, write_surface
  from mne._fiff.constants import FIFF
  from mne.channels import make_dig_montage
  from mne.datasets import testing
  from mne.io import read_info
  from mne.surface import _compute_nearest, _get_ico_surface, _marching_cubes, _normal_orth, _project_onto_surface, _read_patch, _tessellate_sphere, _voxel_neighbors, fast_cross_3d, get_head_surf, get_meg_helmet_surf, read_curvature
  from mne.transforms import _get_trans
  from mne.utils import _record_warnings, catch_logging, object_diff, requires_freesurfer
label_desc: Use image node_id 1 for calling a global function with example usage: test_helmet() without return types