code: def testTrace(self):
      for dtype in [np.int32, np.float32, np.float64]:
          for shape in [
              [2, 2],
              [2, 3],
              [3, 2],
              [2, 3, 2],
              [2, 2, 2, 3],
          ]:
              x = (
                  np.random.rand(np.prod(shape))
                  .astype(dtype)
                  .reshape(shape)
              )
              self.compare(x)
  
file_path: tensorflow/tensorflow/python/kernel_tests/trace_op_test.py
imports: import numpy
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 3 for calling the TraceTest obj's underlying member method code with example usage: obj.testTrace() without return types