code: def test_epochs_spectrum_average(epochs_spectrum, method):
      """Test EpochsSpectrum.average()."""
      avg_spect = epochs_spectrum.average(method=method)
      assert avg_spect.shape == epochs_spectrum.shape[1:]
      assert avg_spect._dims == ("channel", "freq")
  
imports: from functools import partial
  import numpy
  import pytest
  from matplotlib.colors import same_color
  from numpy.testing import assert_array_equal
  from mne import Annotations
  from mne.time_frequency import read_spectrum
  from mne.time_frequency.spectrum import EpochsSpectrumArray, SpectrumArray
label_desc: Use image node_id 11 for calling a global function with example usage: test_epochs_spectrum_average(epochs_spectrum, method) without return types