docstr: Assign made-up gradient to test custom_gradient.
docstr_tok: ["Assign","made-up","gradient","to","test","custom_gradient","."]
code: def test_custom_gradient_composed_two_matrix_vars(self):
      """Assign made-up gradient to test custom_gradient."""
  
      def grad_x(x, y):
          return 6 * (x - y)
  
      def grad_y(x, y):
          return 6 * (y - x)
  
      @gs.autodiff.custom_gradient(grad_x, grad_y)
      def func(x, y):
          return gs.sum((x - y) ** 2)
  
      arg_x = gs.array([[1.0, 3.0], [2.0, 3.0]])
      const_y = gs.array([[2.0, 5.0], [0.0, 4.0]])
  
      def func_2(x):
          return gs.exp(-0.5 * func(x, const_y))
  
      result_value, result_grad = gs.autodiff.value_and_grad(func_2)(
          arg_x
      )
      expected_value = func_2(arg_x)
      expected_grad = 3 * (const_y - arg_x) * expected_value
      self.assertAllClose(result_value, expected_value)
      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 13 for calling the TestAutodiff obj's underlying member method code with example usage: obj.test_custom_gradient_composed_two_matrix_vars() and returns: unknown, unknown, gs, gs