code: def test_riemann_correctness(get_mats):
      """Test Riemannian kernel correctness"""
      n_matrices, n_channels = 5, 3
      X = get_mats(n_matrices, n_channels, "spd")
      K = kernel_riemann(X, Cref=np.eye(n_channels), reg=0)
  
      log_X = logm(X)
      tensor = np.tensordot(log_X, log_X.T, axes=1)
      K1 = np.trace(tensor, axis1=1, axis2=2)
      assert_array_almost_equal(K, K1)
  
file_path: pyRiemann/tests/test_utils_kernel.py
imports: import numpy
  from numpy.testing import assert_array_equal, assert_array_almost_equal
  import pytest
  from pyriemann.utils.base import logm
  from pyriemann.utils.kernel import kernel, kernel_euclid, kernel_logeuclid, kernel_riemann
  from pyriemann.utils.mean import mean_covariance
  from pyriemann.utils.test import is_sym_pos_semi_def
label_desc: Use image node_id 8 for calling a global function with example usage: test_riemann_correctness(get_mats) without return types