code: def _train_model(model, callback_to_use, num_of_epochs):
      loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(
          from_logits=True
      )
      model.compile(
          optimizer="adam",
          loss=loss_fn,
          metrics=["accuracy"],
      )
      (x_train, y_train), _ = _get_dataset()
      model.fit(
          x_train,
          y_train,
          epochs=num_of_epochs,
          callbacks=callback_to_use,
          verbose=0,
      )
  
      return model
  
imports: 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 cluster_utils
  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.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 3 for calling a global function with example usage: _train_model(model, callback_to_use, num_of_epochs) and returns: model