code: def estimate_head_mri_t(subject, subjects_dir=None, verbose=None):
      """Estimate the head->mri transform from fsaverage fiducials.
  
      A subject's fiducials can be estimated given a Freesurfer ``recon-all``
      by transforming ``fsaverage`` fiducials using the inverse Talairach
      transform, see :func:`mne.coreg.get_mni_fiducials`.
  
      Parameters
      ----------
      %(subject)s
      %(subjects_dir)s
      %(verbose)s
  
      Returns
      -------
      %(trans_not_none)s
      """
      from .channels.montage import (
          compute_native_head_t,
          make_dig_montage,
      )
  
      subjects_dir = get_subjects_dir(subjects_dir, raise_error=True)
      lpa, nasion, rpa = get_mni_fiducials(subject, subjects_dir)
      montage = make_dig_montage(
          lpa=lpa["r"],
          nasion=nasion["r"],
          rpa=rpa["r"],
          coord_frame="mri",
      )
      return invert_transform(compute_native_head_t(montage))
  
imports: import os.path
  from gzip import GzipFile
  from pathlib import Path
  import numpy
  from ._fiff.constants import FIFF
  from ._fiff.meas_info import read_fiducials
  from .surface import _read_mri_surface, read_surface
  from .transforms import Transform, _ensure_trans, apply_trans, combine_transforms, invert_transform, read_ras_mni_t
  from .utils import _check_fname, _check_option, _import_nibabel, _validate_type, get_subjects_dir, logger, verbose
label_desc: Use image node_id 13 for calling a global function with example usage: estimate_head_mri_t(subject, subjects_dir, verbose) and returns: invert_transform