code: def assert_sgpr_vs_svgp(
      m1: BayesianModel,
      m2: BayesianModel,
  ) -> None:
      data = m1.data
  
      m1_ll_before = m1.training_loss()
      m2_ll_before = m2.training_loss(data)
  
      assert_different(m2_ll_before, m1_ll_before)
  
      params = [(m2.q_mu, m2.q_sqrt)]
      opt = NaturalGradient(1.0)
      opt.minimize(m2.training_loss_closure(data), var_list=params)
  
      m1_ll_after = m1.training_loss()
      m2_ll_after = m2.training_loss(data)
  
      np.testing.assert_allclose(m1_ll_after, m2_ll_after, atol=1e-4)
  
imports: from typing import Any, Optional, Tuple
  import numpy
  import pytest
  import tensorflow
  from check_shapes import check_shapes
  import gpflow
  from gpflow import set_trainable
  from gpflow.config import default_float
  from gpflow.kernels import Kernel, SquaredExponential
  from gpflow.likelihoods import Gaussian, Likelihood
  from gpflow.models import GPR, SGPR, SVGP, VGP, BayesianModel
  from gpflow.optimizers import NaturalGradient
label_desc: Use image node_id 9 for calling a global function with example usage: assert_sgpr_vs_svgp(m1, m2) without return types