code: def test_funm_ndarray(funm):
      def test(funm, C):
          if funm == powm:
              D = funm(C, 0.2)
          else:
              D = funm(C)
          assert C.shape == D.shape
  
      n_matrices = 6
      C_3d = np.asarray([np.eye(n_channels) for _ in range(n_matrices)])
      test(funm, C_3d)
  
      n_sets = 5
      C_4d = np.asarray([C_3d for _ in range(n_sets)])
      test(funm, C_4d)
  
file_path: pyRiemann/tests/test_utils_base.py
imports: import pytest
  import numpy
  from numpy.testing import assert_array_almost_equal
  from pyriemann.utils.base import expm, invsqrtm, logm, powm, sqrtm, nearest_sym_pos_def
  from pyriemann.utils.mean import mean_riemann
  from pyriemann.utils.test import is_pos_def, is_sym_pos_def
label_desc: Use image node_id 8 for calling a global function with example usage: test_funm_ndarray(funm) without return types