code: def test_head_to_mni():
      """Test conversion of aseg vertices to MNI coordinates."""
      # obtained using freeview
      coords = (
          np.array(
              [
                  [22.52, 11.24, 17.72],
                  [22.52, 5.46, 21.58],
                  [16.10, 5.46, 22.23],
                  [21.24, 8.36, 22.23],
              ]
          )
          / 1000.0
      )
  
      xfm = read_talxfm("sample", subjects_dir)
      coords_MNI = apply_trans(xfm["trans"], coords) * 1000.0
  
      mri_head_t, _ = _get_trans(
          trans_fname, "mri", "head", allow_none=False
      )
  
      # obtained from sample_audvis-meg-oct-6-mixed-fwd.fif
      coo_right_amygdala = np.array(
          [
              [0.01745682, 0.02665809, 0.03281873],
              [0.01014125, 0.02496262, 0.04233755],
              [0.01713642, 0.02505193, 0.04258181],
              [0.01720631, 0.03073877, 0.03850075],
          ]
      )
      coords_MNI_2 = head_to_mni(
          coo_right_amygdala, "sample", mri_head_t, subjects_dir
      )
      # less than 1mm error
      assert_allclose(coords_MNI, coords_MNI_2, atol=10.0)
  
file_path: mne-python/mne/tests/test_freesurfer.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  import mne
  from mne import get_volume_labels_from_aseg, head_to_mni, read_freesurfer_lut, read_talxfm, vertex_to_mni
  from mne._freesurfer import _check_subject_dir, _estimate_talxfm_rigid, _get_mgz_header, read_lta
  from mne.datasets import testing
  from mne.transforms import _angle_between_quats, _get_trans, apply_trans, rot_to_quat
label_desc: Use image node_id 4 for calling a global function with example usage: test_head_to_mni() without return types