code: def test_mean_of_means(kind, mean, get_mats):
      """Test mean of submeans equal to grand mean"""
      n_matrices, n_channels = 10, 3
      mats = get_mats(n_matrices, n_channels, kind)
      if mean is mean_ale and kind == "hpd":
          pytest.skip()
      if mean == mean_power:
          p = -0.42
          C = mean(mats, p)
          C1 = mean(mats[: n_matrices // 2], p)
          C2 = mean(mats[n_matrices // 2 :], p)
          C3 = mean(np.array([C1, C2]), p)
      else:
          C = mean(mats)
          C1 = mean(mats[: n_matrices // 2])
          C2 = mean(mats[n_matrices // 2 :])
          C3 = mean(np.array([C1, C2]))
      assert C3 == approx(C, 6)
  
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 6 for calling a global function with example usage: test_mean_of_means(kind, mean, get_mats) without return types