code: def _read_isotrak_hsp_points(fname):
      """Read Polhemus Isotrak digitizer data from a ``.hsp`` file.
  
      Parameters
      ----------
      fname : path-like
          The filepath of .hsp Polhemus Isotrak file.
  
      Returns
      -------
      out : dict of arrays
          The dictionary containing locations for 'nasion', 'lpa', 'rpa'
          and 'points'.
      """
  
      def get_hsp_fiducial(line):
          return np.fromstring(
              line.replace("%F", ""), dtype=float, sep="\t"
          )
  
      with open(fname) as ff:
          for line in ff:
              if "position of fiducials" in line.lower():
                  break
  
          nasion = get_hsp_fiducial(ff.readline())
          lpa = get_hsp_fiducial(ff.readline())
          rpa = get_hsp_fiducial(ff.readline())
  
          _ = ff.readline()
          line = ff.readline()
          if line:
              n_points, n_cols = np.fromstring(
                  line, dtype=int, sep="\t"
              )
              points = np.fromstring(
                  string=ff.read(),
                  dtype=float,
                  sep="\t",
              ).reshape(-1, n_cols)
              assert points.shape[0] == n_points
          else:
              points = np.empty((0, 3))
  
      return {
          "nasion": nasion,
          "lpa": lpa,
          "rpa": rpa,
          "points": points,
      }
  
imports: import os.path
  import re
  from collections import OrderedDict
  from copy import deepcopy
  from dataclasses import dataclass
  import numpy
  from .._fiff._digitization import _coord_frame_const, _count_points_by_type, _ensure_fiducials_head, _format_dig_points, _get_data_as_dict_from_dig, _get_dig_eeg, _get_fid_coords, _make_dig_points, _read_dig_fif, write_dig
  from .._fiff.constants import CHANNEL_LOC_ALIASES, FIFF
  from .._fiff.meas_info import create_info
  from .._fiff.open import fiff_open
  from .._fiff.pick import _picks_to_idx, channel_type, pick_types
  from .._freesurfer import get_mni_fiducials
  from ..defaults import HEAD_SIZE_DEFAULT
  from ..transforms import Transform, _ensure_trans, _fit_matched_points, _frame_to_str, _quat_to_affine, _sph_to_cart, _topo_to_sph, _verbose_frames, apply_trans, get_ras_to_neuromag_trans
  from ..utils import _check_fname, _check_option, _on_missing, _pl, _validate_type, copy_function_doc_to_method_doc, fill_doc, verbose, warn
  from ..utils.docs import docdict
  from ..viz import plot_montage
  from ._dig_montage_utils import _parse_brainvision_dig_montage, _read_dig_montage_egi
label_desc: Use image node_id 16 for calling a global function with example usage: _read_isotrak_hsp_points(fname) and returns: dict, np