code: def test_custom_gradient_chain_rule_one_vector_var(self):
      def fun1_grad(x):
          return 6 * x
  
      @gs.autodiff.custom_gradient(fun1_grad)
      def fun1(x):
          return gs.sum(x) ** 2
  
      def fun2(x):
          out = fun1(x) ** 3
          return out
  
      def fun2_grad(x):
          return 3 * x**2
  
      arg = gs.array([1.0, 2.0])
  
      result_value, result_grad = gs.autodiff.value_and_grad(fun2)(arg)
  
      expected_value = fun2(arg)
      expected_grad_explicit = 18 * fun1(arg) ** 2 * arg
      expected_grad_chain_rule = fun2_grad(fun1(arg)) * fun1_grad(arg)
  
      self.assertAllClose(result_value, expected_value)
      self.assertAllClose(result_grad, expected_grad_explicit)
      self.assertAllClose(result_grad, expected_grad_chain_rule)
  
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 16 for calling the TestAutodiff obj's underlying member method code with example usage: obj.test_custom_gradient_chain_rule_one_vector_var() and returns: unknown, unknown, out, unknown