code: def test_make_field_map_eeg():
      """Test interpolation of EEG field onto head."""
      evoked = read_evokeds(evoked_fname, condition="Left Auditory")
      evoked.info["bads"] = ["MEG 2443", "EEG 053"]  # add some bads
      surf = get_head_surf("sample", subjects_dir=subjects_dir)
      # we must have trans if surface is in MRI coords
      pytest.raises(
          ValueError, _make_surface_mapping, evoked.info, surf, "eeg"
      )
  
      evoked.pick(picks="eeg")
      fmd = make_field_map(
          evoked,
          trans_fname,
          subject="sample",
          subjects_dir=subjects_dir,
      )
  
      # trans is necessary for EEG only
      pytest.raises(
          RuntimeError,
          make_field_map,
          evoked,
          None,
          subject="sample",
          subjects_dir=subjects_dir,
      )
  
      fmd = make_field_map(
          evoked,
          trans_fname,
          subject="sample",
          subjects_dir=subjects_dir,
      )
      assert len(fmd) == 1
      assert_array_equal(
          fmd[0]["data"].shape, (642, 59)
      )  # maps data onto surf
      assert len(fmd[0]["ch_names"]) == 59
  
imports: from os import path
  from pathlib import Path
  import numpy
  import pytest
  from numpy.polynomial import legendre
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy.interpolate import interp1d
  import mne
  from mne import Epochs, make_fixed_length_events, pick_types, read_evokeds
  from mne.datasets import testing
  from mne.forward import _make_surface_mapping, make_field_map
  from mne.forward._field_interpolation import _setup_dots
  from mne.forward._lead_dots import _comp_sum_eeg, _comp_sums_meg, _do_cross_dots, _get_legen_table
  from mne.forward._make_forward import _create_meg_coils
  from mne.io import read_raw_fif
  from mne.surface import get_head_surf, get_meg_helmet_surf
label_desc: Use image node_id 4 for calling a global function with example usage: test_make_field_map_eeg() without return types