code: def test_eigenvalues(self):
      P = self.pca._eigenvalues_summary
      # Test againt FactoMineR
      F = load_df_from_R("pca$eig")[: self.pca.n_components]
      np.testing.assert_allclose(F["eigenvalue"], P["eigenvalue"])
      np.testing.assert_allclose(
          F["percentage of variance"], P["% of variance"]
      )
      np.testing.assert_allclose(
          F["cumulative percentage of variance"],
          P["% of variance (cumulative)"],
      )
      # Test against scikit-learn
      n = len(self.active)
      S = self.sk_pca[-1].explained_variance_ * (n - 1) / n
      np.testing.assert_allclose(P["eigenvalue"], S)
      np.testing.assert_allclose(
          P["% of variance"],
          self.sk_pca[-1].explained_variance_ratio_ * 100,
      )
  
imports: from __future__ import annotations
  import math
  import numpy
  import pandas
  import pytest
  import rpy2.robjects
  import sklearn.utils.estimator_checks
  import sklearn.utils.validation
  from sklearn import decomposition, pipeline, preprocessing
  import prince
  from tests import load_df_from_R
label_desc: Use image node_id 5 for calling the TestPCA obj's underlying member method code with example usage: obj.test_eigenvalues() without return types