code: def test_check_weights_error_length():
      n_matrices = 5
      with pytest.raises(ValueError):  # not same length
          check_weights(np.ones(n_matrices), n_matrices + 1)
  
imports: import numpy
  import pytest
  from pyriemann.utils.utils import check_weights
label_desc: Use image node_id 3 for calling a global function with example usage: test_check_weights_error_length() without return types