code: def test_csd_tfr():
      """Test computing cross-spectral density on time-frequency epochs."""
      rng = np.random.default_rng(11)
      n_epochs = 6
      info = mne.io.read_info(raw_fname)
      info = mne.pick_info(info, mne.pick_types(info, eeg=True))
      freqs = np.arange(38, 40)
      times = np.linspace(0, 1, int(round(info["sfreq"])))
      data = (
          rng.normal(size=(n_epochs, len(info.ch_names), times.size))
          * 1e-6
      )
      epochs = mne.EpochsArray(data, info)
      csd_test = csd_morlet(
          epochs, freqs, n_cycles=7, tmin=0.25, tmax=0.75
      )
      epochs_tfr = tfr_morlet(
          epochs,
          freqs,
          n_cycles=7,
          average=False,
          return_itc=False,
          output="complex",
      )
      csd = csd_tfr(epochs_tfr, tmin=0.25, tmax=0.75)
      assert_allclose(csd._data, csd_test._data)
      assert_array_equal(csd.frequencies, freqs)
  
imports: import pickle
  from itertools import product
  from os import path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from pytest import raises
  import mne
  from mne.channels import equalize_channels
  from mne.proj import Projection
  from mne.time_frequency import CrossSpectralDensity, csd_array_fourier, csd_array_morlet, csd_array_multitaper, csd_fourier, csd_morlet, csd_multitaper, csd_tfr, pick_channels_csd, read_csd, tfr_morlet
  from mne.time_frequency.csd import _sym_mat_to_vector, _vector_to_sym_mat
  from mne.utils import sum_squared
label_desc: Use image node_id 19 for calling a global function with example usage: test_csd_tfr() without return types