code: def _call_digitization(info, mrk, elp, hsp, kit_info):
      # Use values from kit_info only if all others are None
      if mrk is None and elp is None and hsp is None:
          mrk = kit_info.get("mrk", None)
          elp = kit_info.get("elp", None)
          hsp = kit_info.get("hsp", None)
  
      # prepare mrk
      if isinstance(mrk, list):
          mrk = [
              read_mrk(marker)
              if isinstance(marker, (str, Path, PathLike))
              else marker
              for marker in mrk
          ]
          mrk = np.mean(mrk, axis=0)
  
      # setup digitization
      if mrk is not None and elp is not None and hsp is not None:
          with info._unlock():
              (
                  info["dig"],
                  info["dev_head_t"],
                  info["hpi_results"],
              ) = _set_dig_kit(mrk, elp, hsp, kit_info["eeg_dig"])
      elif mrk is not None or elp is not None or hsp is not None:
          raise ValueError(
              "mrk, elp and hsp need to be provided as a group "
              "(all or none)"
          )
  
      return info
  
imports: from collections import OrderedDict, defaultdict
  from math import cos, sin
  from os import SEEK_CUR, PathLike
  from os import path
  from pathlib import Path
  import numpy
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import _empty_info
  from ..._fiff.pick import pick_types
  from ..._fiff.utils import _mult_cal_one
  from ...epochs import BaseEpochs
  from ...event import read_events
  from ...transforms import als_ras_trans, apply_trans
  from ...utils import _check_fname, _check_option, _stamp_to_dt, fill_doc, logger, verbose, warn
  from ..base import BaseRaw
  from .constants import KIT, LEGACY_AMP_PARAMS
  from .coreg import _set_dig_kit, read_mrk
label_desc: Use image node_id 1 for calling a global function with example usage: _call_digitization(info, mrk, elp, hsp, kit_info) and returns: info