code: def testDeeplyNestedDifferentiableFunctionWithVariableMultipleTFGrads(
      self,
  ):
      with context.graph_mode(), self.cached_session():
          v = resource_variable_ops.ResourceVariable(3.0)
          v.initializer.run()
  
          @polymorphic_function.function
          def inner_fn(a, b):
              return math_ops.add(a, b)
  
          @polymorphic_function.function
          def middle_fn(a, b):
              return math_ops.mul(a, inner_fn(a, b))
  
          @polymorphic_function.function
          def outer_fn(x):
              return middle_fn(x, v)
  
          x = constant_op.constant(5.0)
          self.assertAllEqual(outer_fn(x), 5.0 * (5.0 + 3.0))
  
          (grad,) = gradients_impl.gradients(outer_fn(x), x)
  
          self.assertAllEqual(grad, 2 * 5.0 + 3.0)
          self.assertAllEqual(outer_fn(x), 5.0 * (5.0 + 3.0))
          self.assertAllEqual(middle_fn(v, x), 3.0 * (3.0 + 5.0))
  
          (grad,) = gradients_impl.gradients(outer_fn(x), x)
  
          self.assertAllEqual(grad, 2 * 5.0 + 3.0)
  
          y = constant_op.constant(4.0)
          (grad,) = gradients_impl.gradients(outer_fn(y), y)
          self.assertAllEqual(grad, 2 * 4.0 + 3.0)
  
          self.evaluate(v.assign(constant_op.constant(1.5)))
          (grad,) = gradients_impl.gradients(outer_fn(y), y)
  
          self.assertAllEqual(grad, 2 * 4.0 + 1.5)
  
          (grad,) = gradients_impl.gradients(inner_fn(y, v), y)
          self.assertAllEqual(grad, 1.0)
  
imports: from absl.testing import parameterized
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.eager.polymorphic_function import polymorphic_function
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
label_desc: Use image node_id 39 for calling the FunctionGradientsTest obj's underlying member method code with example usage: obj.testDeeplyNestedDifferentiableFunctionWithVariableMultipleTFGrads() and returns: math_ops, math_ops, middle_fn