code: def test_variational_univariate_log_likelihood(
      diag: bool, whiten: bool
  ) -> None:
      # reference marginal likelihood estimate
      reference_log_marginal_likelihood = (
          univariate_log_marginal_likelihood(
              y=Datum.y_data, K=Datum.K, noise_var=Datum.noise_var
          )
      )
      q_mu: AnyNDArray = (
          np.ones((1, Datum.num_latent_gps)) * Datum.posterior_mean
      )
      ones = (
          np.ones((1, Datum.num_latent_gps))
          if diag
          else np.ones((1, 1, Datum.num_latent_gps))
      )
      q_sqrt = ones * Datum.posterior_std
      model = gpflow.models.SVGP(
          kernel=SquaredExponential(variance=Datum.K),
          likelihood=Gaussian(),
          inducing_variable=Datum.Z,
          num_latent_gps=Datum.num_latent_gps,
          q_diag=diag,
          whiten=whiten,
          q_mu=q_mu,
          q_sqrt=q_sqrt,
      )
      model_likelihood = model.elbo(Datum.data).numpy()
      assert_allclose(
          model_likelihood, reference_log_marginal_likelihood, atol=4
      )
  
imports: from typing import Tuple, cast
  import numpy
  import pytest
  from check_shapes import check_shapes
  from numpy.testing import assert_allclose
  import gpflow
  from gpflow.base import AnyNDArray
  from gpflow.kernels import SquaredExponential
  from gpflow.likelihoods import Gaussian
  from tests.gpflow.kernels.reference import ref_rbf_kernel
label_desc: Use image node_id 7 for calling a global function with example usage: test_variational_univariate_log_likelihood(diag, whiten) without return types