code: def test_snirf_against_nirx():
      """Test Homer generated against file snirf was created from."""
      raw_homer = read_raw_snirf(sfnirs_homer_103_wShort, preload=True)
      _reorder_nirx(raw_homer)
      raw_orig = read_raw_nirx(
          sfnirs_homer_103_wShort_original, preload=True
      )
  
      # Check annotations are the same
      assert_allclose(
          raw_homer.annotations.onset, raw_orig.annotations.onset
      )
      assert_allclose(
          [float(d) for d in raw_homer.annotations.description],
          [float(d) for d in raw_orig.annotations.description],
      )
      # Homer writes durations as 5s regardless of the true duration.
      # So we will not test that the nirx file stim durations equal
      # the homer file stim durations.
  
      # Check names are the same
      assert raw_homer.info["ch_names"] == raw_orig.info["ch_names"]
  
      # Check frequencies are the same
      num_chans = len(raw_homer.ch_names)
      new_chs = raw_homer.info["chs"]
      ori_chs = raw_orig.info["chs"]
      assert_allclose(
          [new_chs[idx]["loc"][9] for idx in range(num_chans)],
          [ori_chs[idx]["loc"][9] for idx in range(num_chans)],
      )
  
      # Check data is the same
      assert_allclose(raw_homer.get_data(), raw_orig.get_data())
  
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 5 for calling a global function with example usage: test_snirf_against_nirx() without return types