code: def read_mrk(fname):
      r"""Marker Point Extraction in MEG space directly from sqd.
  
      Parameters
      ----------
      fname : path-like
          Absolute path to Marker file.
          File formats allowed: \*.sqd, \*.mrk, \*.txt.
  
      Returns
      -------
      mrk_points : ndarray, shape (n_points, 3)
          Marker points in MEG space [m].
      """
      from .kit import _read_dirs
  
      fname = Path(
          _check_fname(fname, "read", must_exist=True, name="mrk file")
      )
      if fname.suffix != ".pickled":
          _check_option(
              "file extension", fname.suffix, (".sqd", ".mrk", ".txt")
          )
      if fname.suffix in (".sqd", ".mrk"):
          with open(fname, "rb", buffering=0) as fid:
              dirs = _read_dirs(fid)
              fid.seek(dirs[KIT.DIR_INDEX_COREG]["offset"])
              # skips match_done, meg_to_mri and mri_to_meg
              fid.seek(KIT.INT + (2 * KIT.DOUBLE * 16), SEEK_CUR)
              mrk_count = np.fromfile(fid, INT32, 1)[0]
              pts = []
              for _ in range(mrk_count):
                  # mri_type, meg_type, mri_done, meg_done
                  _, _, _, meg_done = np.fromfile(fid, INT32, 4)
                  _, meg_pts = np.fromfile(fid, FLOAT64, 6).reshape(
                      2, 3
                  )
                  if meg_done:
                      pts.append(meg_pts)
              mrk_points = np.array(pts)
      elif fname.suffix == ".txt":
          mrk_points = _read_dig_kit(fname, unit="m")
      elif fname.suffix == ".pickled":
          warn(
              "Reading pickled files is unsafe and not future compatible, save "
              "to a standard format (text or FIF) instea, e.g. with:\n"
              r"np.savetxt(fid, pts, delimiter=\"\\t\", newline=\"\\n\")",
              FutureWarning,
          )
          with open(fname, "rb") as fid:
              food = pickle.load(fid)  # nosec B301
          try:
              mrk_points = food["mrk"]
          except Exception:
              raise ValueError(
                  f"{fname} does not contain marker points."
              ) from None
  
      # check output
      mrk_points = np.asarray(mrk_points)
      if mrk_points.shape != (5, 3):
          err = "%r is no marker file, shape is " "%s" % (
              fname,
              mrk_points.shape,
          )
          raise ValueError(err)
      return mrk_points
  
file_path: mne-python/mne/io/kit/coreg.py
imports: import pickle
  import re
  from collections import OrderedDict
  from os import SEEK_CUR, PathLike
  from pathlib import Path
  import numpy
  from ..._fiff._digitization import _make_dig_points
  from ...channels.montage import _check_dig_shape, read_custom_montage, read_dig_polhemus_isotrak, read_polhemus_fastscan
  from ...transforms import Transform, als_ras_trans, apply_trans, get_ras_to_neuromag_trans
  from ...utils import _check_fname, _check_option, warn
  from .constants import FIFF, KIT
label_desc: Use image node_id 1 for calling a global function with example usage: read_mrk(fname) and returns: mrk_points