code: def test_pick_events():
      """Test pick events in a events ndarray."""
      events = np.array(
          [[1, 0, 1], [2, 1, 0], [3, 0, 4], [4, 4, 2], [5, 2, 0]]
      )
      assert_array_equal(
          pick_events(events, include=[1, 4], exclude=4),
          [[1, 0, 1], [3, 0, 4]],
      )
      assert_array_equal(
          pick_events(events, exclude=[0, 2]), [[1, 0, 1], [3, 0, 4]]
      )
      assert_array_equal(
          pick_events(events, include=[1, 2], step=True),
          [[1, 0, 1], [2, 1, 0], [4, 4, 2], [5, 2, 0]],
      )
  
      with pytest.raises(
          TypeError, match="must be an integer or a list"
      ):
          pick_events(events, include=1.2)
  
      with pytest.raises(
          TypeError, match="must be an integer or a list"
      ):
          pick_events(events, include={"a": 1})
  
imports: import os
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import Annotations, Epochs, compute_raw_covariance, count_events, create_info, find_events, find_stim_steps, make_fixed_length_events, pick_channels, pick_events, read_events, read_evokeds, write_events
  from mne.datasets import testing
  from mne.event import AcqParserFIF, define_target_events, match_event_names, merge_events, shift_time_events
  from mne.io import RawArray, read_raw_fif
label_desc: Use image node_id 7 for calling a global function with example usage: test_pick_events() without return types