code: def test_acqparser_averaging():
      """Test averaging with AcqParserFIF vs. Elekta software."""
      raw = read_raw_fif(fname_raw_elekta, preload=True)
      acqp = AcqParserFIF(raw.info)
      for cat in acqp.categories:
          # XXX datasets match only when baseline is applied to both,
          # not sure where relative dc shift comes from
          cond = acqp.get_condition(raw, cat)
          eps = Epochs(raw, baseline=(-0.05, 0), **cond)
          ev = eps.average()
          ev_ref = read_evokeds(
              fname_ave_elekta,
              cat["comment"],
              baseline=(-0.05, 0),
              proj=False,
          )
          ev_mag = ev.copy()
          ev_mag.pick(["MEG0111"])
          ev_grad = ev.copy()
          ev_grad.pick(["MEG2643", "MEG1622"])
          ev_ref_mag = ev_ref.copy()
          ev_ref_mag.pick(["MEG0111"])
          ev_ref_grad = ev_ref.copy()
          ev_ref_grad.pick(["MEG2643", "MEG1622"])
          assert_allclose(
              ev_mag.data, ev_ref_mag.data, rtol=0, atol=1e-15
          )  # tol = 1 fT
          assert ev_grad.ch_names == ev_ref_grad.ch_names
          assert_allclose(
              ev_grad.data, ev_ref_grad.data, rtol=0, atol=1e-13
          )
  
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 11 for calling a global function with example usage: test_acqparser_averaging() without return types