code: def test_stim_eog_misc_chs_in_nsx():
      """Test stim/misc/eog channel assignments."""
      raw = read_raw_nsx(
          nsx_22_fname, stim_channel="elec127", eog=["elec126"]
      )
      assert raw.info["chs"][127]["kind"] == FIFF.FIFFV_STIM_CH
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_EOG_CH
      raw = read_raw_nsx(
          nsx_22_fname, stim_channel=["elec127"], eog=["elec126"]
      )
      assert raw.info["chs"][127]["kind"] == FIFF.FIFFV_STIM_CH
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_EOG_CH
      raw = read_raw_nsx(
          nsx_22_fname, stim_channel=127, eog=["elec126"]
      )
      assert raw.info["chs"][127]["kind"] == FIFF.FIFFV_STIM_CH
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_EOG_CH
      raw = read_raw_nsx(
          nsx_22_fname, stim_channel=[127], eog=["elec126"]
      )
      assert raw.info["chs"][127]["kind"] == FIFF.FIFFV_STIM_CH
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_EOG_CH
      stims = [
          ch_info["kind"] == FIFF.FIFFV_STIM_CH
          for ch_info in raw.info["chs"]
      ]
      assert np.any(stims)
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_EOG_CH
      with pytest.raises(ValueError, match="Invalid stim_channel"):
          raw = read_raw_nsx(
              nsx_22_fname,
              stim_channel=["elec128", 129],
              eog=["elec126"],
          )
      with pytest.raises(ValueError, match="Invalid stim_channel"):
          raw = read_raw_nsx(
              nsx_22_fname, stim_channel=("elec128",), eog=["elec126"]
          )
  
      raw = read_raw_nsx(
          nsx_22_fname,
          stim_channel="elec127",
          misc=["elec126", "elec1"],
      )
      assert raw.info["chs"][126]["kind"] == FIFF.FIFFV_MISC_CH
      assert raw.info["chs"][1]["kind"] == FIFF.FIFFV_MISC_CH
  
file_path: mne-python/mne/io/nsx/tests/test_nsx.py
imports: import os
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from mne import make_fixed_length_epochs
  from mne._fiff.constants import FIFF
  from mne._fiff.meas_info import _empty_info
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_raw_nsx
  from mne.io.nsx.nsx import _decode_online_filters, _read_header
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 5 for calling a global function with example usage: test_stim_eog_misc_chs_in_nsx() without return types