code: def channel_indices_by_type(info, picks=None):
      """Get indices of channels by type.
  
      Parameters
      ----------
      %(info_not_none)s
      %(picks_all)s
  
      Returns
      -------
      idx_by_type : dict
          A dictionary that maps each channel type to a (possibly empty) list of
          channel indices.
      """
      idx_by_type = {
          key: list()
          for key in _PICK_TYPES_KEYS
          if key not in ("meg", "fnirs", "eyetrack")
      }
      idx_by_type.update(
          mag=list(),
          grad=list(),
          hbo=list(),
          hbr=list(),
          fnirs_cw_amplitude=list(),
          fnirs_fd_ac_amplitude=list(),
          fnirs_fd_phase=list(),
          fnirs_od=list(),
          eyegaze=list(),
          pupil=list(),
      )
      picks = _picks_to_idx(
          info, picks, none="all", exclude=(), allow_empty=True
      )
      for k in picks:
          ch_type = channel_type(info, k)
          for key in idx_by_type.keys():
              if ch_type == key:
                  idx_by_type[key].append(k)
      return idx_by_type
  
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 15 for calling a global function with example usage: channel_indices_by_type(info, picks) and returns: idx_by_type