code: def _testLogSumExp(
      self, x, dtype=dtypes.float32, use_gpu=False, **kwargs
  ):
      with self.cached_session(use_gpu=use_gpu):
          x = ops.convert_to_tensor(x, dtype=dtype)
  
          result_naive, result_fused = self.evaluate(
              self._computeLogSumExp(x, **kwargs)
          )
  
      tol = 2e-2 if dtype in [dtypes.float16, dtypes.bfloat16] else 1e-6
      self.assertAllClose(
          result_naive, result_fused, rtol=tol, atol=tol
      )
  
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 2 for calling the CumulativeLogsumexpTest obj's underlying member method code with example usage: obj._testLogSumExp(x, dtype, use_gpu) without return types