code: def test_spectrum_array(kind, tmp_path, request):
      """Test EpochsSpectrumArray and SpectrumArray constructors."""
      spectrum = request.getfixturevalue(f"{kind}_spectrum")
      data, freqs = spectrum.get_data(return_freqs=True)
      Klass = SpectrumArray if kind == "raw" else EpochsSpectrumArray
      spect_arr = Klass(data=data, info=spectrum.info, freqs=freqs)
      _check_spectrum_equivalent(spectrum, spect_arr, tmp_path)
  
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 17 for calling a global function with example usage: test_spectrum_array(kind, tmp_path, request) without return types