code: def test_snirf_basic():
      """Test reading SNIRF files."""
      raw = read_raw_snirf(sfnirs_homer_103_wShort, preload=True)
  
      # Test data import
      assert raw._data.shape == (26, 145)
      assert raw.info["sfreq"] == 12.5
  
      # Test channel naming
      assert raw.info["ch_names"][:4] == [
          "S1_D1 760",
          "S1_D9 760",
          "S2_D3 760",
          "S2_D10 760",
      ]
      assert raw.info["ch_names"][24:26] == ["S5_D8 850", "S5_D13 850"]
  
      # Test frequency encoding
      assert raw.info["chs"][0]["loc"][9] == 760
      assert raw.info["chs"][24]["loc"][9] == 850
  
      # Test source locations
      assert_allclose(
          [-8.6765 * 1e-2, 0.0049 * 1e-2, -2.6167 * 1e-2],
          _get_loc(raw, "S1_D1 760")[3:6],
          rtol=0.02,
      )
      assert_allclose(
          [7.9579 * 1e-2, -2.7571 * 1e-2, -2.2631 * 1e-2],
          _get_loc(raw, "S2_D3 760")[3:6],
          rtol=0.02,
      )
      assert_allclose(
          [-2.1387 * 1e-2, -8.8874 * 1e-2, 3.8393 * 1e-2],
          _get_loc(raw, "S3_D2 760")[3:6],
          rtol=0.02,
      )
      assert_allclose(
          [1.8602 * 1e-2, 9.7164 * 1e-2, 1.7539 * 1e-2],
          _get_loc(raw, "S4_D4 760")[3:6],
          rtol=0.02,
      )
      assert_allclose(
          [-0.1108 * 1e-2, 0.7066 * 1e-2, 8.9883 * 1e-2],
          _get_loc(raw, "S5_D5 760")[3:6],
          rtol=0.02,
      )
  
      # Test detector locations
      assert_allclose(
          [-8.0409 * 1e-2, -2.9677 * 1e-2, -2.5415 * 1e-2],
          _get_loc(raw, "S1_D1 760")[6:9],
          rtol=0.02,
      )
      assert_allclose(
          [-8.7329 * 1e-2, 0.7577 * 1e-2, -2.7980 * 1e-2],
          _get_loc(raw, "S1_D9 850")[6:9],
          rtol=0.02,
      )
      assert_allclose(
          [9.2027 * 1e-2, 0.0161 * 1e-2, -2.8909 * 1e-2],
          _get_loc(raw, "S2_D3 850")[6:9],
          rtol=0.02,
      )
      assert_allclose(
          [7.7548 * 1e-2, -3.5901 * 1e-2, -2.3179 * 1e-2],
          _get_loc(raw, "S2_D10 850")[6:9],
          rtol=0.02,
      )
  
      assert "fnirs_cw_amplitude" in raw
  
imports: import shutil
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  from mne._fiff.constants import FIFF
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_raw_nirx, read_raw_snirf
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.preprocessing.nirs import _reorder_nirx, beer_lambert_law, optical_density, short_channels, source_detector_distances
  from mne.transforms import _get_trans, apply_trans
  from mne.utils import catch_logging
label_desc: Use image node_id 4 for calling a global function with example usage: test_snirf_basic() without return types