code: def test_q_sqrt_constraints(
      Xdata: tf.Tensor,
      Xnew: tf.Tensor,
      kernel: Kernel,
      mu: tf.Tensor,
      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)
  
      Fstars = []
      for q_sqrt in [q_sqrt_constrained, q_sqrt_unconstrained]:
          with tf.GradientTape() as tape:
              _, Fstar_var = conditional(
                  Xnew, Xdata, kernel, mu, q_sqrt=q_sqrt, white=white
              )
  
          grad = tape.gradient(Fstar_var, q_sqrt.unconstrained_variable)
          q_sqrt.unconstrained_variable.assign_sub(grad)
          Fstars.append(Fstar_var)
  
      diff_Fstar_before_gradient_step = Fstars[0] - Fstars[1]
      assert_allclose(diff_Fstar_before_gradient_step, 0)
  
      diff_after_gradient_step = (
          q_sqrt_constrained - q_sqrt_unconstrained
      ).numpy()
      assert_allclose(diff_after_gradient_step, 0)
  
imports: import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  import gpflow
  from gpflow import Parameter
  from gpflow.base import AnyNDArray, MeanAndVariance
  from gpflow.conditionals import conditional
  from gpflow.config import default_float
  from gpflow.kernels import Kernel
  from gpflow.utilities.bijectors import triangular
label_desc: Use image node_id 10 for calling a global function with example usage: test_q_sqrt_constraints(Xdata, Xnew, kernel, mu, white) without return types