code: def test_old_vs_new_with_posterior(
      cache_type: PrecomputeCacheType,
      likelihood: gpflow.likelihoods.Likelihood,
      full_cov: bool,
      full_output_cov: bool,
  ) -> None:
      X, X_new, Y = _get_data_for_tests()
      mold, mnew = make_models((X, Y), likelihood)
  
      mu_old, var2_old = mold.predict_f(
          X_new, full_cov=full_cov, full_output_cov=full_output_cov
      )
      mu_new_cache, var2_new_cache = mnew.posterior(
          cache_type
      ).predict_f(
          X_new, full_cov=full_cov, full_output_cov=full_output_cov
      )
  
      # check new cache is same as old version
      np.testing.assert_allclose(mu_old, mu_new_cache)
      np.testing.assert_allclose(var2_old, var2_new_cache)
  
file_path: GPflow/tests/gpflow/models/test_vgp_posterior.py
imports: from typing import Tuple
  import numpy
  import pytest
  from check_shapes import check_shapes
  import gpflow
  from gpflow.base import AnyNDArray, RegressionData
  from gpflow.models.vgp import VGP_deprecated, VGP_with_posterior
  from gpflow.posteriors import PrecomputeCacheType
label_desc: Use image node_id 4 for calling a global function with example usage: test_old_vs_new_with_posterior(cache_type, likelihood, full_cov, full_output_cov) without return types