code: def _verifySolve(self, x, y, adjoint):
      for np_type in self.float_types & {np.float32, np.float64}:
          tol = 1e-4 if np_type == np.float32 else 1e-12
          a = x.astype(np_type)
          b = y.astype(np_type)
          np_ans = np.linalg.solve(
              np.swapaxes(a, -2, -1) if adjoint else a, b
          )
          with self.session() as sess:
              with self.test_scope():
                  tf_ans = linalg_ops.matrix_solve(
                      a, b, adjoint=adjoint
                  )
              out = sess.run(tf_ans)
              self.assertEqual(tf_ans.shape, out.shape)
              self.assertEqual(np_ans.shape, out.shape)
              self.assertAllClose(np_ans, out, atol=tol, rtol=tol)
  
file_path: tensorflow-upstream/tensorflow/compiler/tests/matrix_solve_op_test.py
imports: import os
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.platform import googletest
  from tensorflow.python.platform import sysconfig
label_desc: Use image node_id 1 for calling the MatrixSolveOpTest obj's underlying member method code with example usage: obj._verifySolve(x, y, adjoint) without return types