code: def test_n_components_explained_variance_ratio(self, n_samples, atol):
      X = self.data_generator.random_point(n_samples)
  
      n_components_0 = self.estimator.n_components
  
      target = 0.9
      self.estimator.n_components = target
  
      self.estimator.fit(X)
      res = gs.cumsum(self.estimator.explained_variance_ratio_)[-1]
      self.assertTrue(res > target - atol)
  
      self.estimator.n_components = n_components_0
  
file_path: geomstats/geomstats/test_cases/learning/pca.py
imports: import pytest
  import geomstats.backend
  from geomstats.test_cases.learning._base import BaseEstimatorTestCase
label_desc: Use image node_id 4 for calling the TangentPCATestCase obj's underlying member method code with example usage: obj.test_n_components_explained_variance_ratio(n_samples, atol) without return types