code: def test_egi_mff_pause(fname, skip_times, event_times):
      """Test EGI MFF with pauses."""
      pytest.importorskip("defusedxml")
      if fname == egi_pause_w1337_fname:
          # too slow to _test_raw_reader
          raw = read_raw_egi(fname).load_data()
      else:
          with pytest.warns(
              RuntimeWarning, match="Acquisition skips detected"
          ):
              raw = _test_raw_reader(
                  read_raw_egi,
                  input_fname=fname,
                  test_scaling=False,  # XXX probably some bug
                  test_rank="less",
              )
      assert raw.info["sfreq"] == 250.0  # true for all of these files
      assert len(raw.annotations) == len(skip_times)
  
      # assert event onsets match expected times
      if event_times is None:
          with pytest.raises(
              ValueError, match="Consider using .*events_from"
          ):
              find_events(raw)
      else:
          events = find_events(raw)
          for event_type in event_times.keys():
              ns_samples = np.floor(
                  np.array(event_times[event_type]) * raw.info["sfreq"]
              )
              assert_array_equal(
                  events[events[:, 2] == raw.event_id[event_type], 0],
                  ns_samples,
              )
  
      # read some data from the middle of the skip, assert it's all zeros
      stim_picks = pick_types(
          raw.info, meg=False, stim=True, exclude=()
      )
      other_picks = np.setdiff1d(
          np.arange(len(raw.ch_names)), stim_picks
      )
      for ii, annot in enumerate(raw.annotations):
          assert annot["description"] == "BAD_ACQ_SKIP"
          start, stop = raw.time_as_index(
              [annot["onset"], annot["onset"] + annot["duration"]]
          )
          data, _ = raw[:, start:stop]
          assert_array_equal(data[other_picks], 0.0)
          if event_times is not None:
              assert raw.ch_names[-1] == "STI 014"
              assert not np.array_equal(data[stim_picks], 0.0)
  
          # assert skips match expected onset and duration
          skip = (
              (start + 1) / raw.info["sfreq"] * 1e6,
              (stop + 1) / raw.info["sfreq"] * 1e6,
          )
          assert skip == skip_times[ii]
  
imports: import os
  import shutil
  from copy import deepcopy
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import io
  from mne import find_events, pick_types
  from mne._fiff.constants import FIFF
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_evokeds_mff, read_raw_egi, read_raw_fif
  from mne.io.egi.egi import _combine_triggers
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import object_diff
label_desc: Use image node_id 1 for calling a global function with example usage: test_egi_mff_pause(fname, skip_times, event_times) without return types