code: def test_fnirs_picks():
      """Test picking of fnirs types after different conversions."""
      raw = read_raw_nirx(fname_nirx_15_0)
      picks = _picks_to_idx(raw.info, "fnirs_cw_amplitude")
      assert len(picks) == len(raw.ch_names)
      raw_subset = raw.copy().pick(picks="fnirs_cw_amplitude")
      for ch in raw_subset.info["chs"]:
          assert ch["coil_type"] == FIFF.FIFFV_COIL_FNIRS_CW_AMPLITUDE
  
      picks = _picks_to_idx(
          raw.info, ["fnirs_cw_amplitude", "fnirs_od"]
      )
      assert len(picks) == len(raw.ch_names)
      picks = _picks_to_idx(
          raw.info, ["fnirs_cw_amplitude", "fnirs_od", "hbr"]
      )
      assert len(picks) == len(raw.ch_names)
      pytest.raises(ValueError, _picks_to_idx, raw.info, "fnirs_od")
      pytest.raises(ValueError, _picks_to_idx, raw.info, "hbo")
      pytest.raises(ValueError, _picks_to_idx, raw.info, ["hbr"])
      pytest.raises(
          ValueError, _picks_to_idx, raw.info, "fnirs_fd_phase"
      )
      pytest.raises(ValueError, _picks_to_idx, raw.info, "junk")
  
      raw = optical_density(raw)
      picks = _picks_to_idx(raw.info, "fnirs_od")
      assert len(picks) == len(raw.ch_names)
      raw_subset = raw.copy().pick(picks="fnirs_od")
      for ch in raw_subset.info["chs"]:
          assert ch["coil_type"] == FIFF.FIFFV_COIL_FNIRS_OD
  
      picks = _picks_to_idx(
          raw.info, ["fnirs_cw_amplitude", "fnirs_od"]
      )
      assert len(picks) == len(raw.ch_names)
      picks = _picks_to_idx(
          raw.info, ["fnirs_cw_amplitude", "fnirs_od", "hbr"]
      )
      assert len(picks) == len(raw.ch_names)
      pytest.raises(
          ValueError, _picks_to_idx, raw.info, "fnirs_cw_amplitude"
      )
      pytest.raises(ValueError, _picks_to_idx, raw.info, "hbo")
      pytest.raises(ValueError, _picks_to_idx, raw.info, "hbr")
      pytest.raises(
          ValueError, _picks_to_idx, raw.info, "fnirs_fd_phase"
      )
      pytest.raises(ValueError, _picks_to_idx, raw.info, "junk")
  
      raw = beer_lambert_law(raw)
      picks = _picks_to_idx(raw.info, "hbo")
      assert len(picks) == len(raw.ch_names) / 2
      raw_subset = raw.copy().pick(picks="hbo")
      for ch in raw_subset.info["chs"]:
          assert ch["coil_type"] == FIFF.FIFFV_COIL_FNIRS_HBO
  
      picks = _picks_to_idx(raw.info, ["hbr"])
      assert len(picks) == len(raw.ch_names) / 2
      raw_subset = raw.copy().pick(picks=["hbr"])
      for ch in raw_subset.info["chs"]:
          assert ch["coil_type"] == FIFF.FIFFV_COIL_FNIRS_HBR
  
      picks = _picks_to_idx(raw.info, ["hbo", "hbr"])
      assert len(picks) == len(raw.ch_names)
      picks = _picks_to_idx(raw.info, ["hbo", "fnirs_od", "hbr"])
      assert len(picks) == len(raw.ch_names)
      picks = _picks_to_idx(raw.info, ["hbo", "fnirs_od"])
      assert len(picks) == len(raw.ch_names) / 2
      pytest.raises(
          ValueError, _picks_to_idx, raw.info, "fnirs_cw_amplitude"
      )
      pytest.raises(ValueError, _picks_to_idx, raw.info, ["fnirs_od"])
      pytest.raises(ValueError, _picks_to_idx, raw.info, "junk")
      pytest.raises(
          ValueError, _picks_to_idx, raw.info, "fnirs_fd_phase"
      )
  
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 1 for calling a global function with example usage: test_fnirs_picks() without return types