code: def test_scaling_scalar_metric(self, scale):
      scaled_metric_1 = ScalarProductMetric(self.space.metric, scale)
      scaled_metric_2_a = ScalarProductMetric(scaled_metric_1, scale)
      scaled_metric_2_b = scale * scaled_metric_1
      scaled_metric_2_c = scaled_metric_1 * scale
  
      point_a, point_b = self.space.random_point(2)
      dist = self.space.metric.squared_dist(point_a, point_b)
      dist_1 = scaled_metric_1.squared_dist(point_a, point_b)
      dist_2_a = scaled_metric_2_a.squared_dist(point_a, point_b)
      dist_2_b = scaled_metric_2_b.squared_dist(point_a, point_b)
      dist_2_c = scaled_metric_2_c.squared_dist(point_a, point_b)
  
      self.assertAllClose(scale * dist, dist_1)
      self.assertAllClose(scale**2 * dist, dist_2_a)
      self.assertAllClose(dist_2_b, dist_2_a)
      self.assertAllClose(dist_2_c, dist_2_a)
  
file_path: geomstats/geomstats/test_cases/geometry/scalar_product_metric.py
imports: from geomstats.geometry.scalar_product_metric import ScalarProductMetric, _get_scaling_factor, _wrap_attr
  from geomstats.test.test_case import TestCase
label_desc: Use image node_id 2 for calling the InstantiationTestCase obj's underlying member method code with example usage: obj.test_scaling_scalar_metric(scale) without return types