code: def _assert_models_equal(self, model1, model2, exclude_keys=None):
      def _remove_keys(config):
          """Removes keys specified in `exclude_keys`."""
          for key in exclude_keys:
              if key in config:
                  del config[key]
  
          for _, v in config.items():
              if isinstance(v, dict):
                  _remove_keys(v)
  
              if isinstance(v, list):
                  for item in v:
                      if isinstance(item, dict):
                          _remove_keys(item)
  
      # Ensure the same config format
      model1.use_legacy_config, model2.use_legacy_config = True, True
      model1_config = model1.get_config()
      model2_config = model2.get_config()
      exclude_keys = exclude_keys or []
      exclude_keys += [
          "build_config"
      ]  # Exclude model build information
      _remove_keys(model1_config)
      _remove_keys(model2_config)
      self.assertEqual(model1_config, model2_config)
      self.assertAllClose(model1.get_weights(), model2.get_weights())
  
      self._assert_outputs_equal(model1, model2)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.keras import compat
  from tensorflow_model_optimization.python.core.keras import test_utils
  from tensorflow_model_optimization.python.core.quantization.keras import quantize
  from tensorflow_model_optimization.python.core.quantization.keras import quantize_config
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
label_desc: Use image node_id 2 for calling the QuantizeIntegrationTest obj's underlying member method code with example usage: obj._assert_models_equal(model1, model2, exclude_keys) without return types