code: def test_euclid(n_dim0, n_dim1, rndstate):
      """Test Euclidean kernel for generic matrices"""
      n_matrices_X, n_matrices_Y = 2, 3
      X = rndstate.randn(n_matrices_X, n_dim0, n_dim1)
      Y = rndstate.randn(n_matrices_Y, n_dim0, n_dim1)
      K = kernel_euclid(X, Y)
      assert K.shape == (n_matrices_X, n_matrices_Y)
  
      K1 = np.empty((n_matrices_X, n_matrices_Y))
      K2 = np.empty((n_matrices_X, n_matrices_Y))
      for i in range(n_matrices_X):
          for j in range(n_matrices_Y):
              K1[i, j] = np.trace(X[i].T @ Y[j])
              K2[i, j] = np.dot(X[i].flatten(), Y[j].flatten())
      assert_array_almost_equal(K, K1)
      assert_array_almost_equal(K, K2)
  
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 7 for calling a global function with example usage: test_euclid(n_dim0, n_dim1, rndstate) without return types