code: def test_whitening_inverse_transform(
      dim_red, metric, rndstate, get_mats
  ):
      """Test Whitening inverse transform"""
      n_matrices, n_channels = 20, 6
      cov = get_mats(n_matrices, n_channels, "spd")
      whit = Whitening(dim_red=dim_red, metric=metric).fit(cov)
      cov_iw = whit.inverse_transform(whit.transform(cov))
      assert cov_iw.shape == (n_matrices, n_channels, n_channels)
      if dim_red is None:
          assert_array_almost_equal(cov, cov_iw)
  
file_path: pyRiemann/tests/test_preprocessing.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal
  import pytest
  from pyriemann.spatialfilters import Whitening
  from pyriemann.utils.mean import mean_covariance
label_desc: Use image node_id 5 for calling a global function with example usage: test_whitening_inverse_transform(dim_red, metric, rndstate, get_mats) without return types