code: def test_ssd_epoched_data():
      """Test Common Spatial Patterns algorithm on epoched data.
  
      Compare the outputs when raw data is used.
      """
      X, A, S = simulate_data(
          n_trials=100, n_channels=20, n_samples=500
      )
      sf = 250
      n_channels = X.shape[0]
      info = create_info(ch_names=n_channels, sfreq=sf, ch_types="eeg")
      n_components_true = 5
  
      # Build epochs as sliding windows over the continuous raw file
  
      # Epoch length is 1 second
      X_e = np.reshape(X, (100, 20, 500))
  
      # Fit
      filt_params_signal = dict(
          l_freq=freqs_sig[0],
          h_freq=freqs_sig[1],
          l_trans_bandwidth=4,
          h_trans_bandwidth=4,
      )
      filt_params_noise = dict(
          l_freq=freqs_noise[0],
          h_freq=freqs_noise[1],
          l_trans_bandwidth=4,
          h_trans_bandwidth=4,
      )
  
      # ssd on epochs
      ssd_e = SSD(info, filt_params_signal, filt_params_noise)
      ssd_e.fit(X_e)
      # ssd on raw
      ssd = SSD(info, filt_params_signal, filt_params_noise)
      ssd.fit(X)
  
      # Check if the 5 first 5 components are the same for both
      _, sorter_spec_e = ssd_e.get_spectral_ratio(ssd_e.transform(X_e))
      _, sorter_spec = ssd.get_spectral_ratio(ssd.transform(X))
      assert_array_equal(
          sorter_spec_e[:n_components_true],
          sorter_spec[:n_components_true],
      )
  
file_path: mne-python/mne/decoding/tests/test_ssd.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  from mne import create_info, io
  from mne.decoding import CSP
  from mne.decoding.ssd import SSD
  from mne.filter import filter_data
  from mne.time_frequency import psd_array_welch
label_desc: Use image node_id 3 for calling a global function with example usage: test_ssd_epoched_data() without return types