code: def test_total_inertia(self):
      F = robjects.r("sum(pca$eig[,1])")[0]
      P = self.pca.total_inertia_
      assert math.isclose(F, P)
  
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 4 for calling the TestPCA obj's underlying member method code with example usage: obj.test_total_inertia() without return types