code: def test_nedf_data():
      """Test reading raw NEDF files."""
      raw = read_raw_nedf(eegfile)
      nsamples = len(raw)
      assert nsamples == 32538
  
      events = find_events(raw, shortest_event=1)
      assert len(events) == 4
      assert_array_equal(events[:, 2], [1, 1, 1, 1])
      onsets = events[:, 0] / raw.info["sfreq"]
      assert raw.info["sfreq"] == 500
  
      data_end = raw.get_data("Fp1", nsamples - 100, nsamples).mean()
      assert_allclose(data_end, 0.0176, atol=0.01)
      assert_allclose(
          raw.get_data("Fpz", 0, 100).mean(), 0.0185, atol=0.01
      )
  
      assert_allclose(onsets, [22.384, 38.238, 49.496, 63.15])
      assert raw.info["meas_date"].year == 2019
      assert raw.ch_names[2] == "AF7"
  
      for ch in raw.info["chs"][:-1]:
          assert ch["kind"] == FIFF.FIFFV_EEG_CH
          assert ch["unit"] == FIFF.FIFF_UNIT_V
      assert raw.info["chs"][-1]["kind"] == FIFF.FIFFV_STIM_CH
      assert raw.info["chs"][-1]["unit"] == FIFF.FIFF_UNIT_V
  
      # full tests
      _test_raw_reader(read_raw_nedf, filename=eegfile)
  
file_path: mne-python/mne/io/nedf/tests/test_nedf.py
imports: import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from mne import find_events
  from mne._fiff.constants import FIFF
  from mne.datasets import testing
  from mne.io.nedf import _parse_nedf_header, read_raw_nedf
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 3 for calling a global function with example usage: test_nedf_data() without return types