code: def test_replace_values(self, n_points, atol):
      points = self.data_generator.random_point(n_points)
      new_points = self.data_generator.random_point(n_points)
  
      n_indices = random.randint(1, n_points)
      indices_int = [
          (index,)
          for index in random.sample(range(0, n_points), n_indices)
      ]
      if n_indices:
          indices = gs.array_from_sparse(
              indices_int, [True for _ in range(n_indices)], (n_points,)
          )
      else:
          indices = gs.zeros(n_points, dtype=bool)
  
      replaced_points = self.space._replace_values(
          points, new_points[indices], indices
      )
  
      self.assertAllClose(
          replaced_points[indices], new_points[indices], atol=atol
      )
  
imports: import random
  import pytest
  import scipy
  import geomstats.backend
  from geomstats.learning.frechet_mean import FrechetMean
  from geomstats.test.random import EmbeddedSpaceRandomDataGenerator, HypersphereIntrinsicRandomDataGenerator
  from geomstats.test.test_case import TestCase
  from geomstats.test.vectorization import generate_vectorization_data
  from geomstats.test_cases.geometry.base import LevelSetTestCase
  from geomstats.test_cases.geometry.manifold import ManifoldTestCase
  from geomstats.vectorization import get_batch_shape
label_desc: Use image node_id 4 for calling the HypersphereExtrinsicTestCase obj's underlying member method code with example usage: obj.test_replace_values(n_points, atol) without return types