code: def covariances_EP(X, P, estimator="cov", **kwds):
      """Special form covariance matrix, concatenating a prototype P.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n_channels, n_times)
          Multi-channel time-series.
      P : ndarray, shape (n_channels_proto, n_times)
          Multi-channel prototype.
      estimator : string, default='scm'
          Covariance matrix estimator, see
          :func:`pyriemann.utils.covariance.covariances`.
      **kwds : optional keyword parameters
          Any further parameters are passed directly to the covariance estimator.
  
      Returns
      -------
      covmats : ndarray, shape (n_matrices, n_channels + n_channels_proto, \
              n_channels + n_channels_proto)
          Covariance matrices.
      """
      est = _check_cov_est_function(estimator)
      n_matrices, n_channels, n_times = X.shape
      n_channels_proto, n_times_p = P.shape
      if n_times_p != n_times:
          raise ValueError(
              f"X and P do not have the same n_times: {n_times} and {n_times_p}"
          )
      covmats = np.empty(
          (
              n_matrices,
              n_channels + n_channels_proto,
              n_channels + n_channels_proto,
          ),
          dtype=X.dtype,
      )
      for i in range(n_matrices):
          covmats[i] = est(np.concatenate((P, X[i]), axis=0), **kwds)
      return covmats
  
imports: import warnings
  from functools import wraps
  import numpy
  from scipy.linalg import block_diag
  from scipy.stats import chi2
  from sklearn.covariance import oas, ledoit_wolf, fast_mcd
  from .distance import distance_mahalanobis
  from .test import is_square, is_real_type
label_desc: Use image node_id 13 for calling a global function with example usage: covariances_EP(X, P, estimator) and returns: covmats