code: def test_persyst_annotations(tmp_path):
      """Test annotations reading in Persyst."""
      new_fname_lay = tmp_path / fname_lay.name
      new_fname_dat = tmp_path / fname_dat.name
      shutil.copy(fname_dat, new_fname_dat)
      shutil.copy(fname_lay, new_fname_lay)
  
      raw = read_raw_persyst(new_fname_lay)
      raw.crop(tmin=0, tmax=4)
  
      # get the annotations and make sure that repeated annotations
      # are in the dataset
      annotations = raw.annotations
      assert np.count_nonzero(annotations.description == "seizure") == 2
  
      # make sure annotation with a "," character is in there
      assert "seizure1,2" in annotations.description
      assert "CLip2" in annotations.description
  
file_path: mne-python/mne/io/persyst/tests/test_persyst.py
imports: import os
  import shutil
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_raw_persyst
  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_persyst_annotations(tmp_path) without return types