code: def _read_dig_fif(fid, meas_info):
      """Read digitizer data from a FIFF file."""
      isotrak = dir_tree_find(meas_info, FIFF.FIFFB_ISOTRAK)
      dig = None
      if len(isotrak) == 0:
          logger.info("Isotrak not found")
      elif len(isotrak) > 1:
          warn("Multiple Isotrak found")
      else:
          isotrak = isotrak[0]
          coord_frame = FIFF.FIFFV_COORD_HEAD
          dig = []
          for k in range(isotrak["nent"]):
              kind = isotrak["directory"][k].kind
              pos = isotrak["directory"][k].pos
              if kind == FIFF.FIFF_DIG_POINT:
                  tag = read_tag(fid, pos)
                  dig.append(tag.data)
              elif kind == FIFF.FIFF_MNE_COORD_FRAME:
                  tag = read_tag(fid, pos)
                  coord_frame = _coord_frame_named.get(
                      int(tag.data.item())
                  )
          for d in dig:
              d["coord_frame"] = coord_frame
      return _format_dig_points(dig)
  
imports: import heapq
  from collections import Counter
  import numpy
  from ..utils import Bunch, _check_fname, _validate_type, logger, verbose, warn
  from .constants import FIFF, _coord_frame_named
  from .tag import read_tag
  from .tree import dir_tree_find
  from .write import start_and_end_file, write_dig_points
label_desc: Use image node_id 4 for calling a global function with example usage: _read_dig_fif(fid, meas_info) and returns: _format_dig_points