code: def _check_models_close(
      m1: SVGP, m2: SVGP, tolerance: float = 1e-2
  ) -> bool:
      m1_params = {p.name: p for p in list(m1.trainable_parameters)}
      m2_params = {p.name: p for p in list(m2.trainable_parameters)}
      if set(m2_params.keys()) != set(m2_params.keys()):
          return False
      for key in m1_params:
          p1 = m1_params[key]
          p2 = m2_params[key]
          if not np.allclose(
              p1.numpy(), p2.numpy(), rtol=tolerance, atol=tolerance
          ):
              return False
      return True
  
file_path: GPflow/tests/gpflow/models/test_svgp.py
imports: from typing import Sequence
  import numpy
  import pytest
  import tensorflow
  from numpy.testing import assert_allclose
  import gpflow
  from gpflow import set_trainable
  from gpflow.base import AnyNDArray
  from gpflow.models import SVGP
label_desc: Use image node_id 4 for calling a global function with example usage: _check_models_close(m1, m2, tolerance) and returns: True, False, False