code: def test_convert_tf_keras_applications_model():
      import tensorflow as tf
  
      tf_keras_model = tf.keras.applications.MobileNet(
          weights="imagenet", input_shape=(224, 224, 3)
      )
  
      # inputs / outputs are optional, we can get from tf.keras model
      # this can be extremely helpful when we want to extract sub-graphs
      input_name = tf_keras_model.inputs[0].name.split(":")[0]
      # note that the `convert()` requires tf.Graph's outputs instead of
      # tf.keras.Model's outputs, to access that, we can do the following
      output_name = tf_keras_model.outputs[0].name.split(":")[0]
      tf_graph_output_name = output_name.split("/")[-1]
  
      mlmodel = ct.convert(
          tf_keras_model,
          inputs=[ct.TensorType(shape=(1, 224, 224, 3))],
          outputs=[tf_graph_output_name],
      )
      mlmodel.save("./mobilenet.mlmodel")
  
imports: from os import getcwd, chdir
  from shutil import rmtree
  from os.path import exists
  from tempfile import mkdtemp
  import pytest
  import numpy
  import coremltools
  import os
  from coremltools._deps import _HAS_TF_1, _HAS_TF_2, _HAS_TORCH, MSG_TF1_NOT_FOUND, MSG_TF2_NOT_FOUND, MSG_TORCH_NOT_FOUND
label_desc: Use image node_id 5 for calling the TestTensorFlow2ConverterExamples obj's underlying member method code with example usage: obj.test_convert_tf_keras_applications_model() without return types