code: def test_mean_riemann_properties(kind, get_mats):
      n_matrices, n_channels = 5, 3
      mats = get_mats(n_matrices, n_channels, kind)
      C = mean_riemann(mats)
  
      # congruence-invariance, P2 in [Moakher2005] or P6 in [Nakamura2009]
      W = np.random.normal(
          size=(n_channels, n_channels)
      )  # must be invertible
      assert W @ C @ W.T == approx(mean_riemann(W @ mats @ W.T))
  
      # self-duality, P3 in [Moakher2005] or P8 in [Nakamura2009]
      assert C == approx(
          np.linalg.inv(mean_riemann(np.linalg.inv(mats)))
      )
  
      # determinant identity, P9 in [Nakamura2009]
      assert np.linalg.det(C) == approx(gmean(np.linalg.det(mats)))
  
imports: import numpy
  from scipy.stats import gmean
  import pytest
  from pytest import approx
  from pyriemann.utils.geodesic import geodesic_riemann
  from pyriemann.utils.mean import mean_covariance, mean_ale, mean_alm, mean_euclid, mean_harmonic, mean_identity, mean_kullback_sym, mean_logdet, mean_logeuclid, mean_power, mean_riemann, mean_wasserstein, maskedmean_riemann, nanmean_riemann
label_desc: Use image node_id 14 for calling a global function with example usage: test_mean_riemann_properties(kind, get_mats) without return types