code: def prune_preserve_quantize_model(
      pruned_model, train_images, train_labels
  ):
      batch_size = 256
      epochs = 5
  
      pruned_model = prune.strip_pruning(pruned_model)
      # Prune preserve QAT model
      quant_aware_annotate_model = quantize.quantize_annotate_model(
          pruned_model
      )
      quant_aware_model = quantize.quantize_apply(
          quant_aware_annotate_model,
          scheme=default_8bit_prune_preserve_quantize_scheme.Default8BitPrunePreserveQuantizeScheme(),
      )
      quant_aware_model.summary()
  
      fit_kwargs = {
          "batch_size": batch_size,
          "epochs": epochs,
      }
      compile_and_fit(
          quant_aware_model,
          train_images,
          train_labels,
          compile_kwargs={},
          fit_kwargs=fit_kwargs,
      )
  
      return quant_aware_model
  
file_path: model-optimization/tensorflow_model_optimization/python/examples/quantization_with_sparsity/keras/mnist_cnn.py
imports: from __future__ import print_function
  from absl import app
  import numpy
  import tensorflow
  from tensorflow_model_optimization.python.core.quantization.keras import quantize
  from tensorflow_model_optimization.python.core.quantization.keras.collab_opts.prune_preserve import default_8bit_prune_preserve_quantize_scheme
  from tensorflow_model_optimization.python.core.sparsity.keras import prune
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_callbacks
  from tensorflow_model_optimization.python.core.sparsity.keras import pruning_schedule
label_desc: Use image node_id 5 for calling a global function with example usage: prune_preserve_quantize_model(pruned_model, train_images, train_labels) and returns: quant_aware_model