code: def make_field_map(
      evoked,
      trans="auto",
      subject=None,
      subjects_dir=None,
      ch_type=None,
      mode="fast",
      meg_surf="helmet",
      origin=(0.0, 0.0, 0.04),
      n_jobs=None,
      *,
      head_source=("bem", "head"),
      verbose=None,
  ):
      """Compute surface maps used for field display in 3D.
  
      Parameters
      ----------
      evoked : Evoked | Epochs | Raw
          The measurement file. Need to have info attribute.
      %(trans)s ``"auto"`` (default) will load trans from the FreeSurfer
          directory specified by ``subject`` and ``subjects_dir`` parameters.
  
          .. versionchanged:: 0.19
              Support for ``'fsaverage'`` argument.
      subject : str | None
          The subject name corresponding to FreeSurfer environment
          variable SUBJECT. If None, map for EEG data will not be available.
      subjects_dir : path-like
          The path to the freesurfer subjects reconstructions.
          It corresponds to Freesurfer environment variable SUBJECTS_DIR.
      ch_type : None | ``'eeg'`` | ``'meg'``
          If None, a map for each available channel type will be returned.
          Else only the specified type will be used.
      mode : ``'accurate'`` | ``'fast'``
          Either ``'accurate'`` or ``'fast'``, determines the quality of the
          Legendre polynomial expansion used. ``'fast'`` should be sufficient
          for most applications.
      meg_surf : 'helmet' | 'head'
          Should be ``'helmet'`` or ``'head'`` to specify in which surface
          to compute the MEG field map. The default value is ``'helmet'``.
      origin : array-like, shape (3,) | 'auto'
          Origin of the sphere in the head coordinate frame and in meters.
          Can be ``'auto'``, which means a head-digitization-based origin
          fit. Default is ``(0., 0., 0.04)``.
  
          .. versionadded:: 0.11
      %(n_jobs)s
      %(head_source)s
  
          .. versionadded:: 1.1
      %(verbose)s
  
      Returns
      -------
      surf_maps : list
          The surface maps to be used for field plots. The list contains
          separate ones for MEG and EEG (if both MEG and EEG are present).
      """
      info = evoked.info
  
      if ch_type is None:
          types = [t for t in ["eeg", "meg"] if t in evoked]
      else:
          _check_option("ch_type", ch_type, ["eeg", "meg"])
          types = [ch_type]
  
      if subjects_dir is not None:
          subjects_dir = _check_fname(
              subjects_dir,
              overwrite="read",
              must_exist=True,
              name="subjects_dir",
              need_dir=True,
          )
      if isinstance(trans, str) and trans == "auto":
          # let's try to do this in MRI coordinates so they're easy to plot
          trans = _find_trans(subject, subjects_dir)
      trans, trans_type = _get_trans(trans, fro="head", to="mri")
  
      if "eeg" in types and trans_type == "identity":
          logger.info("No trans file available. EEG data ignored.")
          types.remove("eeg")
  
      if len(types) == 0:
          raise RuntimeError("No data available for mapping.")
  
      _check_option("meg_surf", meg_surf, ["helmet", "head"])
  
      surfs = []
      for this_type in types:
          if this_type == "meg" and meg_surf == "helmet":
              surf = get_meg_helmet_surf(info, trans)
          else:
              surf = get_head_surf(
                  subject, source=head_source, subjects_dir=subjects_dir
              )
          surfs.append(surf)
  
      surf_maps = list()
  
      for this_type, this_surf in zip(types, surfs):
          this_map = _make_surface_mapping(
              evoked.info,
              this_surf,
              this_type,
              trans,
              n_jobs=n_jobs,
              origin=origin,
              mode=mode,
          )
          surf_maps.append(this_map)
  
      return surf_maps
  
imports: import inspect
  from copy import deepcopy
  import numpy
  from scipy.interpolate import interp1d
  from .._fiff.constants import FIFF
  from .._fiff.meas_info import _simplify_info
  from .._fiff.pick import pick_info, pick_types
  from .._fiff.proj import _has_eeg_average_ref_proj, make_projector
  from ..bem import _check_origin
  from ..cov import make_ad_hoc_cov
  from ..epochs import BaseEpochs, EpochsArray
  from ..evoked import Evoked, EvokedArray
  from ..fixes import _safe_svd
  from ..surface import get_head_surf, get_meg_helmet_surf
  from ..transforms import _find_trans, _get_trans, transform_surface_to
  from ..utils import _check_fname, _check_option, _pl, _reg_pinv, logger, verbose
  from ._lead_dots import _do_cross_dots, _do_self_dots, _do_surface_dots, _get_legen_table
  from ._make_forward import _create_eeg_els, _create_meg_coils, _read_coil_defs
label_desc: Use image node_id 8 for calling a global function with example usage: make_field_map(evoked, trans, subject, subjects_dir, ch_type, mode, meg_surf, origin, n_jobs) and returns: surf_maps