docstr: Here we compile and fit the model.
docstr_tok: ["Here","we","compile","and","fit","the","model","."]
code: def compile_and_fit(self, model):
      """Here we compile and fit the model."""
      model.compile(
          loss=tf.keras.losses.categorical_crossentropy,
          optimizer="adam",
          metrics=["accuracy"],
      )
      model.fit(
          np.random.rand(20, 10),
          tf.keras.utils.to_categorical(
              np.random.randint(5, size=(20, 1)), 5
          ),
          batch_size=20,
      )
  
imports: 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
  from tensorflow_model_optimization.python.core.quantization.keras import quantize
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.cluster_preserve import default_8bit_cluster_preserve_quantize_scheme
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.cluster_preserve.cluster_utils import strip_clustering_cqat
label_desc: Use image node_id 2 for calling the ClusterPreserveIntegrationTest obj's underlying member method code with example usage: obj.compile_and_fit(model) without return types