code: def test_whitening():
      pca = PCA(n_components=2)
      res = pca.fit(X_std).transform(X_std)
      diagonals_sum = np.sum(np.diagonal(np.cov(res.T)))
      assert round(diagonals_sum, 1) == 3.9, diagonals_sum
  
      pca = PCA(n_components=2, whitening=True)
      res = pca.fit(X_std).transform(X_std)
      diagonals_sum = np.sum(np.diagonal(np.cov(res.T)))
      assert round(diagonals_sum, 1) == 2.0, diagonals_sum
  
file_path: mlxtend/mlxtend/feature_extraction/tests/test_principal_component_analysis.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_almost_equal
  from mlxtend.data import iris_data
  from mlxtend.feature_extraction import PrincipalComponentAnalysis
  from mlxtend.preprocessing import standardize
  from mlxtend.utils import assert_raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_whitening() without return types