code: def test_total_inertia(self):
      F = robjects.r("sum(ca$eig[,1])")[0]
      P = self.ca.total_inertia_
      assert math.isclose(F, P)
  
imports: from __future__ import annotations
  import math
  import tempfile
  import numpy
  import pandas
  import pytest
  import rpy2.robjects
  import sklearn.utils.estimator_checks
  import sklearn.utils.validation
  from rpy2.robjects import r
  from scipy import sparse
  import prince
  from tests import load_df_from_R
label_desc: Use image node_id 5 for calling the TestCA obj's underlying member method code with example usage: obj.test_total_inertia() without return types