code: def testSoftmaxGradGradExtendType(self):
      with self.cached_session():
  
          def f(x):
              assert x.dtype == dtypes.float32
              with backprop.GradientTape() as tape:
                  tape.watch(x)
                  y = nn_ops.softmax(x)
              return tape.gradient(y, x)
  
          x = constant_op.constant(
              [[-2, -1, 1, 3], [5, 7, 8, 9]], dtype=dtypes.float32
          )
          error = gradient_checker_v2.max_error(
              *gradient_checker_v2.compute_gradient(f, [x])
          )
          self.assertLess(error, 1e-4)
  
imports: import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import nn_grad
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SoftmaxOpTest obj's underlying member method code with example usage: obj.testSoftmaxGradGradExtendType() and returns: tape