code: def test_kl_k_cholesky(diag: bool) -> None:
      """
      Test that passing K or K_cholesky yield the same answer
      """
      q_mu = Datum.mu
      q_sqrt = Datum.sqrt_diag if diag else Datum.sqrt
      kl_K = gauss_kl(q_mu, q_sqrt, K=Datum.K)
      kl_K_chol = gauss_kl(q_mu, q_sqrt, K_cholesky=Datum.K_cholesky)
  
      np.testing.assert_allclose(kl_K.numpy(), kl_K_chol.numpy())
  
imports: from unittest.mock import patch
  import numpy
  import pytest
  import tensorflow
  from check_shapes import ShapeChecker, check_shapes
  from numpy.testing import assert_allclose, assert_almost_equal
  import gpflow
  from gpflow import Parameter, default_float, default_jitter
  from gpflow.base import AnyNDArray, TensorType
  from gpflow.inducing_variables import InducingPoints
  from gpflow.kernels import Kernel
  from gpflow.kullback_leiblers import gauss_kl, prior_kl
  from gpflow.utilities.bijectors import triangular
label_desc: Use image node_id 7 for calling a global function with example usage: test_kl_k_cholesky(diag) without return types