code: def test_eyelink(
      fname, create_annotations, find_overlaps, apply_offsets
  ):
      """Test reading eyelink asc files."""
      raw = read_raw_eyelink(
          fname,
          create_annotations=create_annotations,
          find_overlaps=find_overlaps,
          apply_offsets=apply_offsets,
      )
  
      # First, tests that shouldn't change based on function arguments
      assert raw.info["sfreq"] == 500  # True for this file
      assert raw.info["meas_date"].month == 3
      assert raw.info["meas_date"].day == 10
      assert raw.info["meas_date"].year == 2022
  
      assert len(raw.info["ch_names"]) == 6
      assert raw.info["chs"][0]["kind"] == FIFF.FIFFV_EYETRACK_CH
      assert (
          raw.info["chs"][0]["coil_type"]
          == FIFF.FIFFV_COIL_EYETRACK_POS
      )
      raw.info["chs"][2]["coil_type"] == FIFF.FIFFV_COIL_EYETRACK_PUPIL
  
      # x_left
      assert all(raw.info["chs"][0]["loc"][3:5] == [-1, -1])
      # pupil_left
      assert raw.info["chs"][2]["loc"][3] == -1
      assert np.isnan(raw.info["chs"][2]["loc"][4])
      # y_right
      assert all(raw.info["chs"][4]["loc"][3:5] == [1, 1])
      assert "RawEyelink" in repr(raw)
  
      # Test some annotation values for accuracy.
      if create_annotations is True and find_overlaps:
          orig = raw.info["meas_date"]
          df = raw.annotations.to_data_frame()
          # Convert annot onset datetimes to seconds, relative to orig_time
          df["time_in_sec"] = df["onset"].apply(
              lambda x: x.timestamp() - orig.timestamp()
          )
          # There is a blink in this data at 8.9 seconds
          cond = (df["time_in_sec"] > 8.899) & (
              df["time_in_sec"] < 8.95
          )
          assert (
              df[cond]["description"].values[0].startswith("BAD_blink")
          )
  
          # Check that the annotation ch_names are set correctly
          assert np.array_equal(
              raw.annotations[0]["ch_names"], MAPPING["both"]
          )
  
      if isinstance(create_annotations, list) and find_overlaps:
          # the last pytest parametrize condition should hit this
          assert np.array_equal(
              raw.annotations[0]["ch_names"], MAPPING["both"]
          )
  
file_path: mne-python/mne/io/eyelink/tests/test_eyelink.py
imports: from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _DATA_CH_TYPES_SPLIT
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_raw_eyelink
  from mne.io.eyelink._utils import _adjust_times, _find_overlaps
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 2 for calling a global function with example usage: test_eyelink(fname, create_annotations, find_overlaps, apply_offsets) without return types