code: def _check_finite_matrix(a, func_name):
      for v in np.nditer(a):
          if not np.isfinite(v.item()):
              raise np.linalg.LinAlgError(
                  "Non-numeric values (nan or inf) in input to "
                  + func_name
              )
  
imports: import ctypes
  import numba
  import numpy
  from numba.core import cgutils, types
  from numba.extending import get_cython_function_address, intrinsic, overload
  from numba.np.linalg import _copy_to_fortran_order, ensure_lapack, get_blas_kind
  from scipy import linalg
  from pytensor.link.numba.dispatch import basic
  from pytensor.link.numba.dispatch.basic import numba_funcify
  from pytensor.tensor.slinalg import BlockDiagonal, Cholesky, SolveTriangular
label_desc: Use image node_id 1 for calling a global function with example usage: _check_finite_matrix(a, func_name) without return types