code: def test_check_subject_dir():
      """Test checking for a Freesurfer recon-all subject directory."""
      _check_subject_dir("sample", subjects_dir)
      with pytest.raises(
          ValueError, match="subject folder is incorrect"
      ):
          _check_subject_dir("foo", data_path)
  
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 1 for calling a global function with example usage: test_check_subject_dir() without return types