code: def test_mean_nan_riemann_shape(init, get_mats, rndstate):
      """Test the Riemannian NaN-mean"""
      n_matrices, n_channels = 10, 6
      mats = get_mats(n_matrices, n_channels, "spd")
      emean = np.mean(mats, axis=0)
      for i in range(n_matrices):
          corrup_channels = rndstate.choice(
              np.arange(0, n_channels),
              size=n_channels // 3,
              replace=False,
          )
          for j in corrup_channels:
              mats[i, j] = np.nan
              mats[i, :, j] = np.nan
      if init:
          C = nanmean_riemann(mats, tol=10e-3, init=emean)
      else:
          C = nanmean_riemann(mats, tol=10e-3)
      assert C.shape == (n_channels, n_channels)
  
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 16 for calling a global function with example usage: test_mean_nan_riemann_shape(init, get_mats, rndstate) without return types