code: def test_eval(self):
      A = self.A
      Ai = tensorinv(A)
      n_ainv = np.linalg.tensorinv(self.a)
      tf_a = function([A], [Ai])
      t_ainv = tf_a(self.a)
      assert _allclose(n_ainv, t_ainv)
  
      B = self.B
      Bi = tensorinv(B)
      Bi1 = tensorinv(B, ind=1)
      n_binv = np.linalg.tensorinv(self.b)
      n_binv1 = np.linalg.tensorinv(self.b1, ind=1)
      tf_b = function([B], [Bi])
      tf_b1 = function([B], [Bi1])
      t_binv = tf_b(self.b)
      t_binv1 = tf_b1(self.b1)
      assert _allclose(t_binv, n_binv)
      assert _allclose(t_binv1, n_binv1)
  
imports: import numpy
  import numpy.linalg
  import pytest
  from numpy import inf
  from numpy.testing import assert_array_almost_equal
  import pytensor
  from pytensor import function
  from pytensor.configdefaults import config
  from pytensor.tensor.math import _allclose
  from pytensor.tensor.nlinalg import SVD, Eig, MatrixInverse, TensorInv, det, eig, eigh, lstsq, matrix_dot, matrix_inverse, matrix_power, norm, pinv, qr, slogdet, svd, tensorinv, tensorsolve, trace
  from pytensor.tensor.type import lmatrix, lscalar, matrix, scalar, tensor3, tensor4, vector
  from tests import unittest_tools
label_desc: Use image node_id 3 for calling the TestTensorInv obj's underlying member method code with example usage: obj.test_eval() without return types