code: def test_cholesky():
      if not imported_scipy:
          raise SkipTest("Scipy needed for the Cholesky op.")
  
      rng = np.random.RandomState(utt.fetch_seed())
      r = rng.randn(5, 5).astype(config.floatX)
      pd = np.dot(r, r.T)
      x = tensor.matrix()
      chol = cholesky(x)
      # Check the default.
      ch_f = function([x], chol)
      yield check_lower_triangular, pd, ch_f
      # Explicit lower-triangular.
      chol = Cholesky(lower=True)(x)
      ch_f = function([x], chol)
      yield check_lower_triangular, pd, ch_f
      # Explicit upper-triangular.
      chol = Cholesky(lower=False)(x)
      ch_f = function([x], chol)
      yield check_upper_triangular, pd, ch_f
      chol = Cholesky(lower=False, on_error="nan")(x)
      ch_f = function([x], chol)
      yield check_upper_triangular, pd, ch_f
  
imports: from __future__ import absolute_import, print_function, division
  import unittest
  import numpy
  import numpy.linalg
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import dec, assert_array_equal, assert_allclose
  from numpy import inf
  import itertools
  import theano
  from theano import tensor, function, grad
  from theano.tensor.basic import _allclose
  from theano.tests.test_rop import break_op
  from theano.tests import unittest_tools
  from theano import config
  from theano.tensor.slinalg import Cholesky, cholesky, CholeskyGrad, Solve, solve, Eigvalsh, EigvalshGrad, eigvalsh, expm, kron
  from theano.tests.unittest_tools import attr
  from nose.plugins.skip import SkipTest
  from nose.tools import assert_raises
label_desc: Use image node_id 3 for calling a global function with example usage: test_cholesky() without return types