code: def numba_funcify_Cholesky(op, node, **kwargs):
      """
      Overload scipy.linalg.cholesky with a numba function.
  
      Note that np.linalg.cholesky is already implemented in numba, but it does not support additional keyword arguments.
      In particular, the `inplace` argument is not supported, which is why we choose to implement our own version.
      """
      lower = op.lower
      overwrite_a = False
      check_finite = op.check_finite
      on_error = op.on_error
  
      dtype = node.inputs[0].dtype
      if str(dtype).startswith("complex"):
          raise NotImplementedError(
              "Complex inputs not currently supported by cholesky in Numba mode"
          )
  
      @numba_basic.numba_njit(inline="always")
      def nb_cholesky(a):
          if check_finite:
              if np.any(np.bitwise_or(np.isinf(a), np.isnan(a))):
                  raise np.linalg.LinAlgError(
                      "Non-numeric values (nan or inf) found in input to cholesky"
                  )
          res, info = _cholesky(a, lower, overwrite_a, check_finite)
  
          if on_error == "raise":
              if info > 0:
                  raise np.linalg.LinAlgError(
                      "Input to cholesky is not positive definite"
                  )
              if info < 0:
                  raise ValueError(
                      'LAPACK reported an illegal value in input on entry to "POTRF."'
                  )
          else:
              if info != 0:
                  res = np.full_like(res, np.nan)
  
          return res
  
      return nb_cholesky
  
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 18 for calling a global function with example usage: numba_funcify_Cholesky(op, node) and returns: nb_cholesky, res