code: def read_dig_polhemus_isotrak(fname, ch_names=None, unit="m"):
      """Read Polhemus digitizer data from a file.
  
      Parameters
      ----------
      fname : path-like
          The filepath of Polhemus ISOTrak formatted file.
          File extension is expected to be ``'.hsp'``, ``'.elp'`` or ``'.eeg'``.
      ch_names : None | list of str
          The names of the points. This will make the points
          considered as EEG channels. If None, channels will be assumed
          to be HPI if the extension is ``'.elp'``, and extra headshape
          points otherwise.
      unit : ``'m'`` | ``'cm'`` | ``'mm'``
          Unit of the digitizer file. Polhemus ISOTrak systems data is usually
          exported in meters. Defaults to ``'m'``.
  
      Returns
      -------
      montage : instance of DigMontage
          The montage.
  
      See Also
      --------
      DigMontage
      make_dig_montage
      read_polhemus_fastscan
      read_dig_captrak
      read_dig_dat
      read_dig_egi
      read_dig_fif
      read_dig_localite
      """
      VALID_FILE_EXT = (".hsp", ".elp", ".eeg")
      fname = str(
          _check_fname(fname, overwrite="read", must_exist=True)
      )
      _scale = _check_unit_and_get_scaling(unit)
  
      _, ext = op.splitext(fname)
      _check_option("fname", ext, VALID_FILE_EXT)
  
      if ext == ".elp":
          data = _read_isotrak_elp_points(fname)
      else:
          # Default case we read points as hsp since is the most likely scenario
          data = _read_isotrak_hsp_points(fname)
  
      if _scale != 1:
          data = {key: val * _scale for key, val in data.items()}
      else:
          pass  # noqa
  
      if ch_names is None:
          keyword = "hpi" if ext == ".elp" else "hsp"
          data[keyword] = data.pop("points")
  
      else:
          points = data.pop("points")
          if points.shape[0] == len(ch_names):
              data["ch_pos"] = OrderedDict(zip(ch_names, points))
          else:
              raise ValueError(
                  "Length of ``ch_names`` does not match the number of points in "
                  f"{fname}. Expected ``ch_names`` length {points.shape[0]}, given "
                  f"{len(ch_names)}"
              )
  
      return make_dig_montage(**data)
  
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 17 for calling a global function with example usage: read_dig_polhemus_isotrak(fname, ch_names, unit) and returns: make_dig_montage