def _call_digitization(info, mrk, elp, hsp, kit_info):
    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)
    if isinstance(mrk, list):
        mrk = [(read_mrk(marker) if isinstance(marker, str) else marker) for marker in mrk]
        mrk = np.mean(mrk, axis=0)
    if ((mrk is not None) and (elp is not None) and (hsp is not None)):
        (dig_points, dev_head_t) = _set_dig_kit(mrk, elp, hsp, kit_info['eeg_dig'])
        info['dig'] = dig_points
        info['dev_head_t'] = dev_head_t
    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
def _call_digitization(info, mrk, elp, hsp, kit_info):
    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)
    if isinstance(mrk, list):
        mrk = [(read_mrk(marker) if isinstance(marker, str) else marker) for marker in mrk]
        mrk = np.mean(mrk, axis=0)
    if ((mrk is not None) and (elp is not None) and (hsp is not None)):
        (dig_points, dev_head_t) = _set_dig_kit(mrk, elp, hsp, kit_info['eeg_dig'])
        info['dig'] = dig_points
        info['dev_head_t'] = dev_head_t
    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