code: def test_normalize_values(rndstate, get_mats):
      """Test normalize values"""
      n_matrices, n_channels = 20, 3
  
      # after corr-normalization => diags = 1 and values in [-1, 1]
      mat = get_mats(n_channels, n_channels, "spd")
      mat_cn = normalize(mat, "corr")
      assert_array_almost_equal(
          np.ones(mat_cn.shape[:-1]),
          np.diagonal(mat_cn, axis1=-2, axis2=-1),
      )
      assert np.all(-1 <= mat_cn) and np.all(mat_cn <= 1)
  
      # after trace-normalization => trace equal to 1
      mat = rndstate.randn(n_matrices, n_channels, n_channels)
      mat_tn = normalize(mat, "trace")
      assert_array_almost_equal(
          np.ones(mat_tn.shape[0]), np.trace(mat_tn, axis1=-2, axis2=-1)
      )
  
      # after determinant-normalization => determinant equal to +/- 1
      mat_dn = normalize(mat, "determinant")
      assert_array_almost_equal(
          np.ones(mat_dn.shape[0]), np.abs(np.linalg.det(mat_dn))
      )
  
      with pytest.raises(ValueError):  # not at least 2d
          normalize(rndstate.randn(n_channels), "trace")
      with pytest.raises(ValueError):  # not square
          shape = (n_matrices, n_channels, n_channels + 2)
          normalize(rndstate.randn(*shape), "trace")
      with pytest.raises(ValueError):  # invalid normalization type
          normalize(
              rndstate.randn(n_matrices, n_channels, n_channels), "abc"
          )
  
imports: from numpy.testing import assert_array_almost_equal
  import numpy
  from scipy.linalg import block_diag
  from scipy.signal import welch, csd, coherence
  from sklearn.covariance import empirical_covariance
  import pytest
  from pyriemann.utils.covariance import covariances, covariances_EP, covariances_X, eegtocov, cross_spectrum, cospectrum, coherence, normalize, get_nondiag_weight, block_covariances, _complex_estimator
  from pyriemann.utils.test import is_real, is_hermitian, is_sym_pos_def, is_herm_pos_def
label_desc: Use image node_id 16 for calling a global function with example usage: test_normalize_values(rndstate, get_mats) without return types