code: def test_nsx():
      """Tests for NEURALCD reader using real anonymized data."""
      raw = read_raw_nsx(
          nsx_test_fname,
      )
      assert getattr(raw, "_data", False) is False
      assert raw.info["sfreq"] == 2000
  
      # Check info object
      assert raw.info["meas_date"].day == 13
      assert raw.info["meas_date"].year == 2000
      assert raw.info["meas_date"].month == 6
      assert raw.info["lowpass"] == 1000
      assert raw.info["highpass"] == 0.3
      assert raw.info["chs"][0]["cal"] == 0.25
      assert raw.info["chs"][0]["range"] == 1e-6
  
      # check raw_extras
      for r in raw._raw_extras:
          assert r["orig_format"] == raw.orig_format
          assert r["orig_nchan"] == 5
          assert len(r["timestamp"]) == len(r["nb_data_points"])
          assert len(r["timestamp"]) == len(r["offset_to_data_block"])
  
      # Check annotations
      assert len(raw.annotations) == 0
  
      raw = _test_raw_reader(
          read_raw_nsx,
          input_fname=nsx_test_fname,
          eog=None,
          misc=None,
      )
      raw_data, times = raw[:]
      n_channels, n_times = raw_data.shape
      assert n_times == 100
      assert times.shape[0] == n_times
      assert n_channels == 5
      # Check data
      assert_allclose(
          raw_data.mean(axis=-1),
          np.array([-52.6375, 88.57, 70.5825, -22.055, -166.5])
          * 1e-6,  # uV
      )
      assert raw.first_time == 3.8
  
      epochs = make_fixed_length_epochs(
          raw, duration=0.05, preload=True, id=1
      )
      assert len(epochs) == 1
      assert epochs.event_id["1"] == 1
      with pytest.raises(ValueError, match="No events produced"):
          _ = make_fixed_length_epochs(raw, duration=0.5, preload=True)
  
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 7 for calling a global function with example usage: test_nsx() without return types