code: def test_sgpr_qu() -> None:
      rng = np.random.RandomState(1)
      X = to_default_float(Datum.X)
      Z = to_default_float(Datum.Z)
      Y = to_default_float(
          np.sin(X @ np.array([[-1.4], [0.5]]))
          + 0.5 * rng.randn(len(X), 1)
      )
      model = gpflow.models.SGPR(
          (X, Y),
          kernel=gpflow.kernels.SquaredExponential(),
          inducing_variable=Z,
      )
  
      gpflow.optimizers.Scipy().minimize(
          model.training_loss, variables=model.trainable_variables
      )
  
      qu_mean, qu_cov = model.compute_qu()
      f_at_Z_mean, f_at_Z_cov = model.predict_f(
          model.inducing_variable.Z, full_cov=True
      )
  
      np.testing.assert_allclose(
          qu_mean, f_at_Z_mean, rtol=1e-5, atol=1e-5
      )
      np.testing.assert_allclose(
          tf.reshape(qu_cov, (1, 20, 20)),
          f_at_Z_cov,
          rtol=1e-5,
          atol=1e-5,
      )
  
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 1 for calling a global function with example usage: test_sgpr_qu() without return types