code: def kernel_euclid(X, Y=None, *, reg=1e-10, **kwargs):
      r"""Euclidean kernel between two sets of matrices.
  
      Calculates the Euclidean kernel matrix :math:`\mathbf{K}` of inner products
      of two sets :math:`\mathbf{X}` and :math:`\mathbf{Y}` of matrices in
      :math:`\mathbb{R}^{n \times m}` by calculating pairwise products:
  
      .. math::
          \mathbf{K}_{i,j} = \text{tr}(\mathbf{X}_i^T \mathbf{Y}_j)
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices_X, n, m)
          First set of matrices.
      Y : None | ndarray, shape (n_matrices_Y, n, m), default=None
          Second set of matrices. If None, Y is set to X.
      reg : float, default=1e-10
          Regularization parameter to mitigate numerical errors in kernel
          matrix estimation.
  
      Returns
      -------
      K : ndarray, shape (n_matrices_X, n_matrices_Y)
          The Euclidean kernel matrix between X and Y.
  
      Notes
      -----
      .. versionadded:: 0.3
  
      See Also
      --------
      kernel
      """
  
      def kernelfct(X, Cref):
          return X
  
      return _apply_matrix_kernel(kernelfct, X, Y, reg=reg)
  
file_path: pyRiemann/pyriemann/utils/kernel.py
imports: import numpy
  from .base import invsqrtm, logm
  from .mean import mean_riemann
label_desc: Use image node_id 1 for calling a global function with example usage: kernel_euclid(X, Y) and returns: _apply_matrix_kernel, X