code: def test_compare_events_and_annotations():
      """Test comparing annotations and events."""
      with pytest.warns(
          RuntimeWarning, match="Could not parse meas date"
      ):
          raw = read_raw_cnt(fname)
      events = np.array(
          [
              [333, 0, 7],
              [1010, 0, 7],
              [1664, 0, 109],
              [2324, 0, 7],
              [2984, 0, 109],
          ]
      )
  
      annot = read_annotations(fname)
      assert len(annot) == 6
      assert_array_equal(
          annot.onset[:-1], events[:, 0] / raw.info["sfreq"]
      )
      assert "STI 014" not in raw.info["ch_names"]
  
file_path: mne-python/mne/io/cnt/tests/test_cnt.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from mne import pick_types
  from mne.annotations import read_annotations
  from mne.datasets import testing
  from mne.io.cnt import read_raw_cnt
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 4 for calling a global function with example usage: test_compare_events_and_annotations() without return types