code: def make_dig_montage(
      ch_pos=None,
      nasion=None,
      lpa=None,
      rpa=None,
      hsp=None,
      hpi=None,
      coord_frame="unknown",
  ):
      r"""Make montage from arrays.
  
      Parameters
      ----------
      ch_pos : dict | None
          Dictionary of channel positions. Keys are channel names and values
          are 3D coordinates - array of shape (3,) - in native digitizer space
          in m.
      nasion : None | array, shape (3,)
          The position of the nasion fiducial point.
          This point is assumed to be in the native digitizer space in m.
      lpa : None | array, shape (3,)
          The position of the left periauricular fiducial point.
          This point is assumed to be in the native digitizer space in m.
      rpa : None | array, shape (3,)
          The position of the right periauricular fiducial point.
          This point is assumed to be in the native digitizer space in m.
      hsp : None | array, shape (n_points, 3)
          This corresponds to an array of positions of the headshape points in
          3d. These points are assumed to be in the native digitizer space in m.
      hpi : None | array, shape (n_hpi, 3)
          This corresponds to an array of HPI points in the native digitizer
          space. They only necessary if computation of a ``compute_dev_head_t``
          is True.
      coord_frame : str
          The coordinate frame of the points. Usually this is ``'unknown'``
          for native digitizer space.
          Other valid values are: ``'head'``, ``'meg'``, ``'mri'``,
          ``'mri_voxel'``, ``'mni_tal'``, ``'ras'``, ``'fs_tal'``,
          ``'ctf_head'``, and ``'ctf_meg'``.
  
          .. note::
              For custom montages without fiducials, this parameter must be set
              to ``'head'``.
  
      Returns
      -------
      montage : instance of DigMontage
          The montage.
  
      See Also
      --------
      DigMontage
      read_dig_captrak
      read_dig_egi
      read_dig_fif
      read_dig_localite
      read_dig_polhemus_isotrak
      """
      _validate_type(ch_pos, (dict, None), "ch_pos")
      if ch_pos is None:
          ch_names = None
      else:
          ch_names = list(ch_pos)
      dig = _make_dig_points(
          nasion=nasion,
          lpa=lpa,
          rpa=rpa,
          hpi=hpi,
          extra_points=hsp,
          dig_ch_pos=ch_pos,
          coord_frame=coord_frame,
      )
  
      return DigMontage(dig=dig, ch_names=ch_names)
  
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 3 for calling a global function with example usage: make_dig_montage(ch_pos, nasion, lpa, rpa, hsp, hpi, coord_frame) and returns: DigMontage