code: def _generate_coherence_data():
      """Create an epochs object with coherence at 22Hz between channels 1 and 3.
  
      A base 10 Hz sine wave is generated for all channels, but with different
      phases, which means no actual coherence. A  22Hz sine wave is laid on top
      for channels 1 and 3, with the same phase, so there is coherence between
      these channels.
      """
      ch_names = ["CH1", "CH2", "CH3"]
      sfreq = 50.0
      info = mne.create_info(ch_names, sfreq, "eeg")
      tstep = 1.0 / sfreq
      n_samples = int(10 * sfreq)  # 10 seconds of data
      times = np.arange(n_samples) * tstep
      events = np.array([[0, 1, 1]])  # one event
  
      # Phases for the signals
      phases = np.arange(info["nchan"]) * 0.3 * np.pi
  
      # Generate 10 Hz sine waves with different phases
      signal = np.vstack(
          [np.sin(times * 2 * np.pi * 10 + phase) for phase in phases]
      )
  
      data = np.zeros((1, info["nchan"], n_samples))
      data[0, :, :] = signal
  
      # Generate 22Hz sine wave at the first and last electrodes with the same
      # phase.
      signal = np.sin(times * 2 * np.pi * 22)
      data[0, [0, -1], :] += signal
  
      return mne.EpochsArray(
          data, info, events, baseline=(0, times[-1])
      )
  
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 12 for calling a global function with example usage: _generate_coherence_data() and returns: mne