code: def test_sgpr_svgp_qu_equivivalent() -> None:
      rng = np.random.RandomState(2)
      X = to_default_float(Datum.X)
      Y = to_default_float(Datum.Y)
      Z = to_default_float(Datum.Z)
      kernel = gpflow.kernels.SquaredExponential()
      linear = gpflow.functions.Linear(A=[[0.1], [0.2]], b=0.3)
      likelihood = gpflow.likelihoods.Gaussian(scale=linear)
      sgpr = gpflow.models.SGPR(
          (X, Y),
          kernel=kernel,
          inducing_variable=Z,
          likelihood=likelihood,
      )
  
      q_mu, q_cov = sgpr.compute_qu()
      q_sqrt = tf.linalg.cholesky(q_cov)
      q_sqrt = q_sqrt[None, :, :]
      svgp = gpflow.models.SVGP(
          kernel=kernel,
          likelihood=likelihood,
          inducing_variable=Z,
          q_mu=q_mu,
          q_sqrt=q_sqrt,
          whiten=False,
      )
  
      Xnew = to_default_float(rng.randn(100, 2))
      np.testing.assert_allclose(
          sgpr.predict_f(Xnew),
          svgp.predict_f(Xnew),
          atol=1e-4,
      )
  
file_path: GPflow/tests/gpflow/models/test_sgpr.py
imports: import numpy
  import tensorflow
  import gpflow
  from gpflow.base import AnyNDArray
  from gpflow.utilities import to_default_float
label_desc: Use image node_id 2 for calling a global function with example usage: test_sgpr_svgp_qu_equivivalent() without return types