code: def test_value_and_grad_dist(self):
      space = SpecialEuclidean(3)
      metric = space.metric
      point = space.random_point()
      id = space.identity
      result_loss, result_grad = gs.autodiff.value_and_grad(
          lambda v: metric.squared_dist(v, id)
      )(point)
  
      expected_loss = metric.squared_dist(point, id)
      expected_grad = -2 * metric.log(id, point)
  
      self.assertAllClose(result_loss, expected_loss)
      self.assertAllClose(result_grad, expected_grad)
  
imports: import warnings
  import numpy
  import pytest
  import geomstats.backend
  from geomstats.geometry.grassmannian import Grassmannian
  from geomstats.geometry.special_euclidean import SpecialEuclidean
  from geomstats.test.test_case import TestCase, autograd_and_torch_only, autograd_only, np_only
label_desc: Use image node_id 4 for calling the TestAutodiff obj's underlying member method code with example usage: obj.test_value_and_grad_dist() without return types