code: def test_talxfm_rigid():
      """Test that talxfm_rigid gives reasonable results."""
      rigid = _estimate_talxfm_rigid(
          "fsaverage", subjects_dir=subjects_dir
      )
      assert_allclose(rigid, np.eye(4), atol=1e-6)
      rigid = _estimate_talxfm_rigid(
          "sample", subjects_dir=subjects_dir
      )
      assert_allclose(
          np.linalg.norm(rigid[:3, :3], axis=1), 1.0, atol=1e-6
      )
      move = 1000 * np.linalg.norm(rigid[:3, 3])
      assert 30 < move < 70
      ang = np.rad2deg(_angle_between_quats(rot_to_quat(rigid[:3, :3])))
      assert 20 < ang < 25
  
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 8 for calling a global function with example usage: test_talxfm_rigid() without return types