code: def test_return_filtered():
      """Test return filtered option."""
      # Check return_filtered
      # Simulated more noise data and with broader frequency than the desired
      X, _, _ = simulate_data(SNR=0.9, freqs_sig=[4, 13])
      sf = 250
      n_channels = X.shape[0]
      info = create_info(ch_names=n_channels, sfreq=sf, ch_types="eeg")
  
      filt_params_signal = dict(
          l_freq=freqs_sig[0],
          h_freq=freqs_sig[1],
          l_trans_bandwidth=1,
          h_trans_bandwidth=1,
      )
      filt_params_noise = dict(
          l_freq=freqs_noise[0],
          h_freq=freqs_noise[1],
          l_trans_bandwidth=1,
          h_trans_bandwidth=1,
      )
  
      # return filtered to true
      ssd = SSD(
          info,
          filt_params_signal,
          filt_params_noise,
          sort_by_spectral_ratio=False,
          return_filtered=True,
      )
      ssd.fit(X)
  
      out = ssd.transform(X)
      psd_out, freqs = psd_array_welch(out[0], sfreq=250, n_fft=250)
      freqs_up = int(freqs[psd_out > 0.5][0]), int(
          freqs[psd_out > 0.5][-1]
      )
      assert freqs_up == freqs_sig
  
      # return filtered to false
      ssd = SSD(
          info,
          filt_params_signal,
          filt_params_noise,
          sort_by_spectral_ratio=False,
          return_filtered=False,
      )
      ssd.fit(X)
  
      out = ssd.transform(X)
      psd_out, freqs = psd_array_welch(out[0], sfreq=250, n_fft=250)
      freqs_up = int(freqs[psd_out > 0.5][0]), int(
          freqs[psd_out > 0.5][-1]
      )
      assert freqs_up != freqs_sig
  
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 6 for calling a global function with example usage: test_return_filtered() without return types