code: def transport(Covs, Cref, metric="riemann"):
      """Parallel transport of a set of SPD matrices towards a reference matrix.
  
      Parameters
      ----------
      Covs : ndarray, shape (n_matrices, n, n)
          Set of SPD matrices.
      Cref : ndarray, shape (n, n)
          The reference SPD matrix.
      metric : string, default='riemann'
          The metric used for mean, can be: 'euclid', 'logeuclid', 'riemann'.
  
      Returns
      -------
      out : ndarray, shape (n_matrices, n, n)
          Set of transported SPD matrices.
      """
      C = mean_covariance(Covs, metric=metric)
      iC = invsqrtm(C)
      E = sqrtm(iC @ Cref @ iC)
      out = E @ Covs @ E.T
      return out
  
file_path: pyRiemann/pyriemann/utils/tangentspace.py
imports: import numpy
  from .base import sqrtm, invsqrtm, logm, expm
  from .mean import mean_covariance
label_desc: Use image node_id 12 for calling a global function with example usage: transport(Covs, Cref, metric) and returns: out