code: def test_cluster_assignment(self, n_samples):
      X = self.data_generator.random_point(n_samples)
      space = self.estimator.space
  
      cluster_centers = self.estimator.fit(X).cluster_centers_
      result = self.estimator.predict(X)
  
      expected = gs.array(
          [
              int(
                  space.metric.closest_neighbor_index(
                      x_i, cluster_centers
                  )
              )
              for x_i in X
          ]
      )
      self.assertAllEqual(result, expected)
  
file_path: geomstats/geomstats/test_cases/learning/_base.py
imports: import pytest
  import geomstats.backend
  from geomstats.test.random import RandomDataGenerator
  from geomstats.test.test_case import TestCase
  from geomstats.vectorization import repeat_point
label_desc: Use image node_id 2 for calling the ClusterMixinsTestCase obj's underlying member method code with example usage: obj.test_cluster_assignment(n_samples) without return types