code: def _testGradient(self, x, use_gpu=False, **kwargs):
      with self.cached_session(use_gpu=use_gpu):
          x = ops.convert_to_tensor(x, dtype=dtypes.float64)
  
          (
              grad_naive_theoretical,
              _,
          ) = gradient_checker_v2.compute_gradient(
              lambda y: math_ops.cumsum(math_ops.exp(y), **kwargs), [x]
          )
          (
              grad_fused_theoretical,
              _,
          ) = gradient_checker_v2.compute_gradient(
              lambda y: math_ops.exp(
                  math_ops.cumulative_logsumexp(y, **kwargs)
              ),
              [x],
          )
  
          self.assertAllClose(
              grad_fused_theoretical, grad_naive_theoretical
          )
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/math_ops/cumulative_logsumexp_test.py
imports: import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 7 for calling the CumulativeLogsumexpTest obj's underlying member method code with example usage: obj._testGradient(x, use_gpu) without return types