code: def test_snirf_nonstandard(tmp_path):
      """Test custom tags."""
      shutil.copy(sfnirs_homer_103_wShort, str(tmp_path) + "/mod.snirf")
      fname = str(tmp_path) + "/mod.snirf"
      # Manually mark up the file to match MNE-NIRS custom tags
      with h5py.File(fname, "r+") as f:
          f.create_dataset("nirs/metaDataTags/middleName", data=[b"X"])
          f.create_dataset("nirs/metaDataTags/lastName", data=[b"Y"])
          f.create_dataset("nirs/metaDataTags/sex", data=[b"1"])
      raw = read_raw_snirf(fname, preload=True)
      assert raw.info["subject_info"]["middle_name"] == "X"
      assert raw.info["subject_info"]["last_name"] == "Y"
      assert raw.info["subject_info"]["sex"] == 1
      with h5py.File(fname, "r+") as f:
          del f["nirs/metaDataTags/sex"]
          f.create_dataset("nirs/metaDataTags/sex", data=[b"2"])
      raw = read_raw_snirf(fname, preload=True)
      assert raw.info["subject_info"]["sex"] == 2
      with h5py.File(fname, "r+") as f:
          del f["nirs/metaDataTags/sex"]
          f.create_dataset("nirs/metaDataTags/sex", data=[b"0"])
      raw = read_raw_snirf(fname, preload=True)
      assert raw.info["subject_info"]["sex"] == 0
  
      with h5py.File(fname, "r+") as f:
          f.create_dataset("nirs/metaDataTags/MNE_coordFrame", data=[1])
  
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 6 for calling a global function with example usage: test_snirf_nonstandard(tmp_path) without return types