class_docstr: Integration tests for clustering.
docstr: Test End to End clustering.
docstr_tok: ["Test","End","to","End","clustering","."]
code: def end_to_end_testing(self, original_model, clusters_check=None):
      """Test End to End clustering."""
  
      clustered_model = cluster.cluster_weights(
          original_model, **self.params
      )
  
      clustered_model.compile(
          loss=keras.losses.categorical_crossentropy,
          optimizer="adam",
          metrics=["accuracy"],
      )
  
      clustered_model.fit(x=self.dataset_generator(), steps_per_epoch=1)
      stripped_model = cluster.strip_clustering(clustered_model)
      if clusters_check is not None:
          clusters_check(stripped_model)
  
      _, tflite_file = tempfile.mkstemp(".tflite")
      _, keras_file = tempfile.mkstemp(".h5")
  
      converter = tf.lite.TFLiteConverter.from_keras_model(
          stripped_model
      )
      tflite_model = converter.convert()
  
      with open(tflite_file, "wb") as f:
          f.write(tflite_model)
  
      self._verify_tflite(tflite_file, self.x_test)
  
      os.remove(keras_file)
      os.remove(tflite_file)
  
imports: import os
  import tempfile
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras.experimental import cluster
label_desc: Use image node_id 5 for calling the ClusterIntegrationTest obj's underlying member method code with example usage: obj.end_to_end_testing(original_model, clusters_check) without return types