code: def test_value_and_grad_two_matrix_vars(self):
      def func(x, y):
          return gs.sum((x - y) ** 2)
  
      arg_x = gs.array([[1.0, 3.0], [2.0, 3.0]])
      arg_y = gs.array([[2.0, 5.0], [0.0, 4.0]])
      val, grad = gs.autodiff.value_and_grad(func, argnums=(0, 1))(
          arg_x, arg_y
      )
      self.assertAllClose(val, 10.0)
      self.assertAllClose(
          grad[0], gs.array([[-2.0, -4.0], [4.0, -2.0]])
      )
      self.assertAllClose(grad[1], gs.array([[2.0, 4.0], [-4.0, 2.0]]))
  
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 9 for calling the TestAutodiff obj's underlying member method code with example usage: obj.test_value_and_grad_two_matrix_vars() and returns: gs