code: def testModelEndToEnd(self, model_type):
      # 1. Check whether quantized model graph can be constructed.
      model = self._get_model(model_type)
      model = quantize.quantize_model(model)
  
      # 2. Sanity check to ensure basic training on random data works.
      x_train, y_train = self._create_test_data(model)
      model.compile(
          loss="categorical_crossentropy",
          optimizer="sgd",
          metrics=["accuracy"],
      )
      model.fit(x_train, y_train)
  
      # 3. Ensure conversion to TFLite works.
      with tempfile.NamedTemporaryFile(suffix=".tflite") as t:
          with quantize.quantize_scope():
              utils.convert_keras_to_tflite(model, t.name)
  
          # 4. Verify input runs on converted model.
          self._verify_tflite(t.name, x_train, y_train)
  
file_path: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/quantize_models_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import inspect
  import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize
  from tensorflow_model_optimization.python.core.quantization.keras import utils
label_desc: Use image node_id 5 for calling the QuantizeModelsTest obj's underlying member method code with example usage: obj.testModelEndToEnd(model_type) without return types