code: def _build_keras_model() -> tf.keras.Model:
      """Creates a Image classification model with MobileNet backbone.
  
      Returns:
        The image classifcation Keras Model and the backbone MobileNet model
      """
      # We create a MobileNet model with weights pre-trained on ImageNet.
      # We remove the top classification layer of the MobileNet, which was
      # used for classifying ImageNet objects. We will add our own classification
      # layer for CIFAR10 later. We use average pooling at the last convolution
      # layer to get a 1D vector for classifcation, which is consistent with the
      # origin MobileNet setup
      base_model = tf.keras.applications.MobileNet(
          input_shape=(224, 224, 3),
          include_top=False,
          weights="imagenet",
          pooling="avg",
      )
      base_model.input_spec = None
  
      # We add a Dropout layer at the top of MobileNet backbone we just created to
      # prevent overfiting, and then a Dense layer to classifying CIFAR10 objects
      model = tf.keras.Sequential(
          [
              tf.keras.layers.InputLayer(
                  input_shape=(224, 224, 3),
                  name=_transformed_name(_IMAGE_KEY),
              ),
              base_model,
              tf.keras.layers.Dropout(0.1),
              tf.keras.layers.Dense(10),
          ]
      )
  
      # Freeze the whole MobileNet backbone to first train the top classifer only
      _freeze_model_by_percentage(base_model, 1.0)
  
      model.compile(
          loss=tf.keras.losses.SparseCategoricalCrossentropy(
              from_logits=True
          ),
          optimizer=tf.keras.optimizers.RMSprop(
              lr=_CLASSIFIER_LEARNING_RATE
          ),
          metrics=["sparse_categorical_accuracy"],
      )
      model.summary(print_fn=absl.logging.info)
  
      return model, base_model
  
imports: import os
  from typing import List
  import absl
  import flatbuffers
  import tensorflow
  import tensorflow_transform
  from tfx.components.trainer.fn_args_utils import DataAccessor
  from tfx.components.trainer.fn_args_utils import FnArgs
  from tfx.components.trainer.rewriting import converters
  from tfx.components.trainer.rewriting import rewriter
  from tfx.components.trainer.rewriting import rewriter_factory
  from tfx.dsl.io import fileio
  from tfx_bsl.tfxio import dataset_options
  from tflite_support import metadata_schema_py_generated
  from tflite_support import metadata
label_desc: Use image node_id 7 for calling a global function with example usage: _build_keras_model() and returns: model,  base_model