code: def _verifyInverse(self, x, np_type):
      for adjoint in False, True:
          y = x.astype(np_type)
          with self.cached_session(
              use_gpu=test_util.is_gpu_available()
          ):
              # Verify that x^{-1} * x == Identity matrix.
              inv = linalg_ops.matrix_inverse(y, adjoint=adjoint)
              tf_ans = self._high_precision_matmul(
                  inv, y, adjoint_b=adjoint
              )
              np_ans = np.identity(y.shape[-1]).astype(np_type)
              if x.ndim > 2:
                  tiling = list(y.shape)
                  tiling[-2:] = [1, 1]
                  np_ans = np.tile(np_ans, tiling)
              out = self.evaluate(tf_ans)
              self.assertAllCloseAccordingToType(
                  np_ans, out, atol=0.001, half_atol=0.1
              )
              self.assertShapeEqual(y, tf_ans)
  
imports: import numpy
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import benchmark
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the InverseOpTest obj's underlying member method code with example usage: obj._verifyInverse(x, np_type) without return types