class_docstr: Estimation of cospectral covariance matrix.
  
  Co-spectral matrices are the real part of complex cross-spectral matrices
  (see :func:`pyriemann.utils.covariance.cross_spectrum`), estimated as the
  spectrum covariance in the frequency domain. This method returns a 4-d
  array with a cospectral covariance matrix for each input and in each
  frequency bin of the FFT.
  
  Parameters
  ----------
  window : int, default=128
      The length of the FFT window used for spectral estimation.
  overlap : float, default=0.75
      The percentage of overlap between window.
  fmin : float | None, default=None
      The minimal frequency to be returned.
  fmax : float | None, default=None
      The maximal frequency to be returned.
  fs : float | None, default=None
      The sampling frequency of the signal.
  
  Attributes
  ----------
  freqs_ : ndarray, shape (n_freqs,)
      If transformed, the frequencies associated to cospectra.
      None if ``fs`` is None.
  
  See Also
  --------
  Covariances
  HankelCovariances
  Coherences
docstr: Estimate the cospectral covariance matrices.
  
  Parameters
  ----------
  X : ndarray, shape (n_matrices, n_channels, n_times)
      Multi-channel time-series.
  
  Returns
  -------
  covmats : ndarray, shape (n_matrices, n_channels, n_channels, n_freqs)
      Covariance matrices for each input and for each frequency bin.
docstr_tok: ["Estimate","the","cospectral","covariance","matrices",".","Parameters","--","--","--","--","--","X",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_times",")","Multi-channel","time-series",".","Returns","--","--","--","-","covmats",":","ndarray",",","shape","(","n_matrices",",","n_channels",",","n_channels",",","n_freqs",")","Covariance","matrices","for","each","input","and","for","each","frequency","bin","."]
code: def transform(self, X):
      """Estimate the cospectral covariance matrices.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n_channels, n_times)
          Multi-channel time-series.
  
      Returns
      -------
      covmats : ndarray, shape (n_matrices, n_channels, n_channels, n_freqs)
          Covariance matrices for each input and for each frequency bin.
      """
      out = []
  
      for i in range(len(X)):
          S, freqs = cospectrum(
              X[i],
              window=self.window,
              overlap=self.overlap,
              fmin=self.fmin,
              fmax=self.fmax,
              fs=self.fs,
          )
          out.append(S)
      self.freqs_ = freqs
  
      return np.array(out)
  
imports: import numpy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.covariance import shrunk_covariance
  from sklearn.metrics.pairwise import pairwise_kernels
  from .spatialfilters import Xdawn
  from .utils.covariance import covariances, covariances_EP, cospectrum, coherence, block_covariances
label_desc: Use image node_id 3 for calling the CospCovariances obj's underlying member method code with example usage: obj.transform(X) and returns: np