code: def test_make_val_and_grad_fn(self):
      minimum = np.array([1.0, 1.0])
      scales = np.array([2.0, 3.0])
  
      @tff.math.make_val_and_grad_fn
      def quadratic(x):
          return tf.reduce_sum(input_tensor=scales * (x - minimum) ** 2)
  
      point = tf.constant([2.0, 2.0], dtype=tf.float64)
      val, grad = self.evaluate(quadratic(point))
      self.assertNear(val, 5.0, 1e-5)
      self.assertArrayNear(grad, [4.0, 6.0], 1e-5)
  
file_path: tf-quant-finance/tf_quant_finance/math/gradient_test.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 5 for calling the GradientTest obj's underlying member method code with example usage: obj.test_make_val_and_grad_fn() and returns: tf