code: def mean_euclid(X=None, sample_weight=None, covmats=None):
      r"""Mean of matrices according to the Euclidean metric.
  
      .. math::
          \mathbf{M} = \sum_i w_i \ \mathbf{X}_i
  
      This mean is also called arithmetic.
  
      Parameters
      ----------
      X : ndarray, shape (n_matrices, n, m)
          Set of matrices.
      sample_weight : None | ndarray, shape (n_matrices,), default=None
          Weights for each matrix. If None, it uses equal weights.
  
      Returns
      -------
      M : ndarray, shape (n, m)
          Euclidean mean.
  
      See Also
      --------
      mean_covariance
      """
      X = _deprecate_covmats(covmats, X)
      return np.average(X, axis=0, weights=sample_weight)
  
imports: from copy import deepcopy
  import numpy
  import warnings
  from .ajd import ajd_pham
  from .base import sqrtm, invsqrtm, logm, expm, powm
  from .distance import distance_riemann
  from .geodesic import geodesic_riemann
  from .utils import check_weights
label_desc: Use image node_id 4 for calling a global function with example usage: mean_euclid(X, sample_weight, covmats) and returns: np