code: def _mgh_or_standard(basename, head_size, coord_frame="unknown"):
      fid_names = ("Nz", "LPA", "RPA")
      fname = op.join(MONTAGE_PATH, basename)
  
      ch_names_, pos = [], []
      with open(fname) as fid:
          # Ignore units as we will scale later using the norms anyway
          for line in fid:
              if "Positions\n" in line:
                  break
          pos = []
          for line in fid:
              if "Labels\n" in line:
                  break
              pos.append(list(map(float, line.split())))
          for line in fid:
              if not line or not set(line) - {" "}:
                  break
              ch_names_.append(line.strip(" ").strip("\n"))
  
      pos = np.array(pos) / 1000.0
      ch_pos = _check_dupes_odict(ch_names_, pos)
      nasion, lpa, rpa = (ch_pos.pop(n) for n in fid_names)
      if head_size is None:
          scale = 1.0
      else:
          scale = head_size / np.median(np.linalg.norm(pos, axis=1))
      for value in ch_pos.values():
          value *= scale
      # if we are in MRI/MNI coordinates, we need to replace nasion, LPA, and RPA
      # with those of fsaverage for ``trans='fsaverage'`` to work
      if coord_frame == "mri":
          lpa, nasion, rpa = (
              x["r"].copy() for x in get_mni_fiducials("fsaverage")
          )
      nasion *= scale
      lpa *= scale
      rpa *= scale
  
      return make_dig_montage(
          ch_pos=ch_pos,
          coord_frame=coord_frame,
          nasion=nasion,
          lpa=lpa,
          rpa=rpa,
      )
  
imports: import csv
  import os.path
  from collections import OrderedDict
  from functools import partial
  import numpy
  from .._freesurfer import get_mni_fiducials
  from ..transforms import _sph_to_cart
  from ..utils import _pl, _soft_import, warn
  from .None import __file__
  from .montage import make_dig_montage
label_desc: Use image node_id 7 for calling a global function with example usage: _mgh_or_standard(basename, head_size, coord_frame) and returns: make_dig_montage