code: def test_numba_Cholesky_raise_on(on_error):
      test_value = rng.random(size=(3, 3)).astype(config.floatX)
  
      x = pt.tensor(dtype=config.floatX, shape=(3, 3))
      g = pt.linalg.cholesky(x, on_error=on_error)
      f = pytensor.function([x], g, mode="NUMBA")
  
      if on_error == "raise":
          with pytest.raises(
              np.linalg.LinAlgError,
              match=r"Input to cholesky is not positive definite",
          ):
              f(test_value)
      else:
          assert np.all(np.isnan(f(test_value)))
  
file_path: pytensor/tests/link/numba/test_slinalg.py
imports: import re
  import numpy
  import pytest
  import pytensor
  import pytensor.tensor
  from pytensor import config
  from pytensor.compile import SharedVariable
  from pytensor.graph import Constant, FunctionGraph
  from tests.link.numba.test_basic import compare_numba_and_py
  from tests.tensor.test_extra_ops import set_test_value
label_desc: Use image node_id 6 for calling a global function with example usage: test_numba_Cholesky_raise_on(on_error) without return types