code: def test_q_sqrt_constraints(
      inducing_points: InducingPoints,
      kernel: Kernel,
      mu: AnyNDArray,
      white: bool,
  ) -> None:
      """Test that sending in an unconstrained q_sqrt returns the same conditional
      evaluation and gradients. This is important to match the behaviour of the KL, which
      enforces q_sqrt is triangular.
      """
  
      tril: AnyNDArray = np.tril(rng.randn(Ln, Nn, Nn))
  
      q_sqrt_constrained = Parameter(tril, transform=triangular())
      q_sqrt_unconstrained = Parameter(tril)
  
      diff_before_gradient_step = (
          q_sqrt_constrained - q_sqrt_unconstrained
      ).numpy()
      assert_allclose(diff_before_gradient_step, 0)
  
      kls = []
      for q_sqrt in [q_sqrt_constrained, q_sqrt_unconstrained]:
          with tf.GradientTape() as tape:
              kl = prior_kl(
                  inducing_points, kernel, mu, q_sqrt, whiten=white
              )
  
          grad = tape.gradient(kl, q_sqrt.unconstrained_variable)
          q_sqrt.unconstrained_variable.assign_sub(grad)
          kls.append(kl)
  
      diff_kls_before_gradient_step = kls[0] - kls[1]
  
      assert_allclose(diff_kls_before_gradient_step, 0)
  
      diff_after_gradient_step = (
          q_sqrt_constrained - q_sqrt_unconstrained
      ).numpy()
      assert_allclose(diff_after_gradient_step, 0)
  
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 14 for calling a global function with example usage: test_q_sqrt_constraints(inducing_points, kernel, mu, white) without return types