code: def test_fnirs_channel_naming_and_order_custom_chroma():
      """Ensure fNIRS channel checking on manually created data."""
      data = np.random.RandomState(0).randn(6, 10)
  
      # Start with a correctly named raw intensity dataset
      # These are the steps required to build an fNIRS Raw object from scratch
      ch_names = [
          "S1_D1 hbo",
          "S1_D1 hbr",
          "S2_D1 hbo",
          "S2_D1 hbr",
          "S3_D1 hbo",
          "S3_D1 hbr",
      ]
      ch_types = np.tile(["hbo", "hbr"], 3)
      info = create_info(
          ch_names=ch_names, ch_types=ch_types, sfreq=1.0
      )
      raw = RawArray(data, info, verbose=True)
  
      chroma = np.unique(_channel_chromophore(raw.info))
      picks = _check_channels_ordered(raw.info, chroma)
      assert len(picks) == len(raw.ch_names)
      assert len(picks) == 6
  
      # Test block creation fails
      ch_names = [
          "S1_D1 hbo",
          "S2_D1 hbo",
          "S3_D1 hbo",
          "S1_D1 hbr",
          "S2_D1 hbr",
          "S3_D1 hbr",
      ]
      ch_types = np.repeat(["hbo", "hbr"], 3)
      info = create_info(
          ch_names=ch_names, ch_types=ch_types, sfreq=1.0
      )
      raw = RawArray(data, info, verbose=True)
      # no issue here
      _check_channels_ordered(raw.info, ["hbo", "hbr"])
      # reordering okay, too
      raw.pick(picks=[0, 3, 1, 4, 2, 5])
      _check_channels_ordered(raw.info, ["hbo", "hbr"])
      # Wrong names should fail
      with pytest.raises(ValueError, match="chromophore in info"):
          _check_channels_ordered(raw.info, ["hbb", "hbr"])
  
      # Test weird naming
      ch_names = [
          "S1_D1 hbb",
          "S1_D1 hbr",
          "S2_D1 hbb",
          "S2_D1 hbr",
          "S3_D1 hbb",
          "S3_D1 hbr",
      ]
      ch_types = np.tile(["hbo", "hbr"], 3)
      info = create_info(
          ch_names=ch_names, ch_types=ch_types, sfreq=1.0
      )
      raw = RawArray(data, info, verbose=True)
      with pytest.raises(ValueError, match="naming conventions"):
          _check_channels_ordered(raw.info, ["hbo", "hbr"])
  
      # Check more weird naming
      ch_names = [
          "S1_DX hbo",
          "S1_DX hbr",
          "S2_D1 hbo",
          "S2_D1 hbr",
          "S3_D1 hbo",
          "S3_D1 hbr",
      ]
      ch_types = np.tile(["hbo", "hbr"], 3)
      info = create_info(
          ch_names=ch_names, ch_types=ch_types, sfreq=1.0
      )
      raw = RawArray(data, info, verbose=True)
      with pytest.raises(ValueError, match="can not be parsed"):
          _check_channels_ordered(raw.info, ["hbo", "hbr"])
  
imports: import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from mne import create_info
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _picks_to_idx
  from mne.datasets import testing
  from mne.datasets.testing import data_path
  from mne.io import RawArray, read_raw_nirx
  from mne.preprocessing.nirs import _channel_chromophore, _channel_frequencies, _check_channels_ordered, _fnirs_optode_names, _fnirs_spread_bads, _optode_position, _validate_nirs_info, beer_lambert_law, optical_density, scalp_coupling_index, tddr
label_desc: Use image node_id 8 for calling a global function with example usage: test_fnirs_channel_naming_and_order_custom_chroma() without return types