code: def test_input_dimension_error(ker, get_mats):
      """Test errors for incorrect dimension"""
      n_matrices, n_channels = 5, 3
      X = get_mats(n_matrices, n_channels, "spd")
      Y = get_mats(n_matrices, n_channels + 1, "spd")
      cref = get_mats(1, n_channels + 1, "spd")[0]
      if ker == "riemann":
          with pytest.raises(AssertionError):
              kernel(X, Cref=cref, metric=ker)
      with pytest.raises(AssertionError):
          kernel(X, Y, metric=ker)
  
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 6 for calling a global function with example usage: test_input_dimension_error(ker, get_mats) without return types