code: def test_plot_source_spectrogram():
      """Test plotting of source spectrogram."""
      sample_src = read_source_spaces(
          subjects_dir / "sample" / "bem" / "sample-oct-6-src.fif"
      )
  
      # dense version
      vertices = [s["vertno"] for s in sample_src]
      n_times = 5
      n_verts = sum(len(v) for v in vertices)
      stc_data = np.ones((n_verts, n_times))
      stc = SourceEstimate(stc_data, vertices, 1, 1)
      plot_source_spectrogram([stc, stc], [[1, 2], [3, 4]])
      pytest.raises(ValueError, plot_source_spectrogram, [], [])
      pytest.raises(
          ValueError,
          plot_source_spectrogram,
          [stc, stc],
          [[1, 2], [3, 4]],
          tmin=0,
      )
      pytest.raises(
          ValueError,
          plot_source_spectrogram,
          [stc, stc],
          [[1, 2], [3, 4]],
          tmax=7,
      )
  
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from mne import SourceEstimate, pick_events, read_cov, read_dipole, read_events, read_evokeds, read_source_spaces
  from mne.chpi import compute_chpi_snr
  from mne.datasets import testing
  from mne.filter import create_filter
  from mne.io import read_raw_fif
  from mne.minimum_norm import read_inverse_operator
  from mne.time_frequency import CrossSpectralDensity
  from mne.viz import plot_bem, plot_chpi_snr, plot_csd, plot_events, plot_filter, plot_snr_estimate, plot_source_spectrogram
  from mne.viz.misc import _handle_event_colors
  from mne.viz.utils import _get_color_list
label_desc: Use image node_id 8 for calling a global function with example usage: test_plot_source_spectrogram() without return types