code: def _convert_fnirs_to_head(
      trans, fro, to, src_locs, det_locs, ch_locs
  ):
      mri_head_t, _ = _get_trans(trans, fro, to)
      src_locs = apply_trans(mri_head_t, src_locs)
      det_locs = apply_trans(mri_head_t, det_locs)
      ch_locs = apply_trans(mri_head_t, ch_locs)
      return src_locs, det_locs, ch_locs, mri_head_t
  
imports: import datetime
  import glob
  import json
  import os.path
  import re
  from configparser import ConfigParser, RawConfigParser
  import numpy
  from scipy.io import loadmat
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _format_dig_points, create_info
  from ..._fiff.utils import _mult_cal_one
  from ..._freesurfer import get_mni_fiducials
  from ...annotations import Annotations
  from ...transforms import _get_trans, apply_trans
  from ...utils import _check_fname, _check_option, _mask_to_onsets_offsets, _validate_type, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
  from ._localized_abbr import _localized_abbr
label_desc: Use image node_id 4 for calling a global function with example usage: _convert_fnirs_to_head(trans, fro, to, src_locs, det_locs, ch_locs) and returns: src_locs,  det_locs,  ch_locs,  mri_head_t