code: def test_field_map_ctf():
      """Test that field mapping can be done with CTF data."""
      raw = read_raw_fif(raw_ctf_fname).crop(0, 1)
      raw.apply_gradient_compensation(3)
      events = make_fixed_length_events(raw, duration=0.5)
      evoked = Epochs(raw, events).average()
      evoked.pick(evoked.ch_names[:50])  # crappy mapping but faster
      # smoke test - passing trans_fname as pathlib.Path as additional check
      make_field_map(
          evoked,
          trans=Path(trans_fname),
          subject="sample",
          subjects_dir=subjects_dir,
      )
  
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 1 for calling a global function with example usage: test_field_map_ctf() without return types