code: def get_channel_type_constants(include_defaults=False):
      """Return all known channel types, and associated FIFF constants.
  
      Parameters
      ----------
      include_defaults : bool
          Whether to include default values for "unit" and "coil_type" for all
          entries (see Notes). Defaults are generally based on values normally
          present for a VectorView MEG system. Defaults to ``False``.
  
      Returns
      -------
      channel_types : dict
          The keys are channel type strings, and the values are dictionaries of
          FIFF constants for "kind", and possibly "unit" and "coil_type".
  
      Notes
      -----
      Values which might vary within a channel type across real data
      recordings are excluded unless ``include_defaults=True``. For example,
      "ref_meg" channels may have coil type
      ``FIFFV_COIL_MAGNES_OFFDIAG_REF_GRAD``, ``FIFFV_COIL_VV_MAG_T3``, etc
      (depending on the recording system), so no "coil_type" entry is given
      for "ref_meg" unless ``include_defaults`` is requested.
      """
      base = dict(
          grad=dict(kind=FIFF.FIFFV_MEG_CH, unit=FIFF.FIFF_UNIT_T_M),
          mag=dict(kind=FIFF.FIFFV_MEG_CH, unit=FIFF.FIFF_UNIT_T),
          ref_meg=dict(kind=FIFF.FIFFV_REF_MEG_CH),
          eeg=dict(
              kind=FIFF.FIFFV_EEG_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_EEG,
          ),
          seeg=dict(
              kind=FIFF.FIFFV_SEEG_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_EEG,
          ),
          dbs=dict(
              kind=FIFF.FIFFV_DBS_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_EEG,
          ),
          ecog=dict(
              kind=FIFF.FIFFV_ECOG_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_EEG,
          ),
          eog=dict(kind=FIFF.FIFFV_EOG_CH, unit=FIFF.FIFF_UNIT_V),
          emg=dict(kind=FIFF.FIFFV_EMG_CH, unit=FIFF.FIFF_UNIT_V),
          ecg=dict(kind=FIFF.FIFFV_ECG_CH, unit=FIFF.FIFF_UNIT_V),
          resp=dict(kind=FIFF.FIFFV_RESP_CH, unit=FIFF.FIFF_UNIT_V),
          bio=dict(kind=FIFF.FIFFV_BIO_CH, unit=FIFF.FIFF_UNIT_V),
          misc=dict(kind=FIFF.FIFFV_MISC_CH, unit=FIFF.FIFF_UNIT_V),
          stim=dict(kind=FIFF.FIFFV_STIM_CH),
          exci=dict(kind=FIFF.FIFFV_EXCI_CH),
          syst=dict(kind=FIFF.FIFFV_SYST_CH),
          ias=dict(kind=FIFF.FIFFV_IAS_CH),
          gof=dict(kind=FIFF.FIFFV_GOODNESS_FIT),
          dipole=dict(kind=FIFF.FIFFV_DIPOLE_WAVE),
          chpi=dict(
              kind=[
                  FIFF.FIFFV_QUAT_0,
                  FIFF.FIFFV_QUAT_1,
                  FIFF.FIFFV_QUAT_2,
                  FIFF.FIFFV_QUAT_3,
                  FIFF.FIFFV_QUAT_4,
                  FIFF.FIFFV_QUAT_5,
                  FIFF.FIFFV_QUAT_6,
                  FIFF.FIFFV_HPI_G,
                  FIFF.FIFFV_HPI_ERR,
                  FIFF.FIFFV_HPI_MOV,
              ]
          ),
          fnirs_cw_amplitude=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_FNIRS_CW_AMPLITUDE,
          ),
          fnirs_fd_ac_amplitude=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              unit=FIFF.FIFF_UNIT_V,
              coil_type=FIFF.FIFFV_COIL_FNIRS_FD_AC_AMPLITUDE,
          ),
          fnirs_fd_phase=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              unit=FIFF.FIFF_UNIT_RAD,
              coil_type=FIFF.FIFFV_COIL_FNIRS_FD_PHASE,
          ),
          fnirs_od=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              coil_type=FIFF.FIFFV_COIL_FNIRS_OD,
          ),
          hbo=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              unit=FIFF.FIFF_UNIT_MOL,
              coil_type=FIFF.FIFFV_COIL_FNIRS_HBO,
          ),
          hbr=dict(
              kind=FIFF.FIFFV_FNIRS_CH,
              unit=FIFF.FIFF_UNIT_MOL,
              coil_type=FIFF.FIFFV_COIL_FNIRS_HBR,
          ),
          csd=dict(
              kind=FIFF.FIFFV_EEG_CH,
              unit=FIFF.FIFF_UNIT_V_M2,
              coil_type=FIFF.FIFFV_COIL_EEG_CSD,
          ),
          temperature=dict(
              kind=FIFF.FIFFV_TEMPERATURE_CH, unit=FIFF.FIFF_UNIT_CEL
          ),
          gsr=dict(kind=FIFF.FIFFV_GALVANIC_CH, unit=FIFF.FIFF_UNIT_S),
          eyegaze=dict(
              kind=FIFF.FIFFV_EYETRACK_CH,
              coil_type=FIFF.FIFFV_COIL_EYETRACK_POS,
          ),
          pupil=dict(
              kind=FIFF.FIFFV_EYETRACK_CH,
              coil_type=FIFF.FIFFV_COIL_EYETRACK_PUPIL,
          ),
      )
      if include_defaults:
          coil_none = dict(coil_type=FIFF.FIFFV_COIL_NONE)
          unit_none = dict(unit=FIFF.FIFF_UNIT_NONE)
          defaults = dict(
              grad=dict(coil_type=FIFF.FIFFV_COIL_VV_PLANAR_T1),
              mag=dict(coil_type=FIFF.FIFFV_COIL_VV_MAG_T3),
              ref_meg=dict(
                  coil_type=FIFF.FIFFV_COIL_VV_MAG_T3,
                  unit=FIFF.FIFF_UNIT_T,
              ),
              misc=dict(
                  **coil_none, **unit_none
              ),  # NB: overwrites UNIT_V
              stim=dict(unit=FIFF.FIFF_UNIT_V, **coil_none),
              eog=coil_none,
              ecg=coil_none,
              emg=coil_none,
              bio=coil_none,
              fnirs_od=unit_none,
              pupil=unit_none,
              eyegaze=dict(unit=FIFF.FIFF_UNIT_PX),
          )
          for key, value in defaults.items():
              base[key].update(value)
      return base
  
imports: import re
  from copy import deepcopy
  import numpy
  from ..utils import _check_option, _ensure_int, _validate_type, fill_doc, logger, verbose, warn
  from .constants import FIFF
label_desc: Use image node_id 1 for calling a global function with example usage: get_channel_type_constants(include_defaults) and returns: base