code: def test_quickstart_example():
      # testing: https://coremltools.readme.io/docs/introductory-quickstart#quickstart-example
      import tensorflow as tf  # TF 2.2.0
  
      # Download MobileNetv2 (using tf.keras)
      keras_model = tf.keras.applications.MobileNetV2(
          weights="imagenet",
          input_shape=(
              224,
              224,
              3,
          ),
          classes=1000,
      )
  
      # Download class labels (from a separate file)
      import urllib
  
      label_url = "https://storage.googleapis.com/download.tensorflow.org/data/ImageNetLabels.txt"
      class_labels = (
          urllib.request.urlopen(label_url).read().splitlines()
      )
      class_labels = class_labels[
          1:
      ]  # remove the first class which is background
      assert len(class_labels) == 1000
  
      # make sure entries of class_labels are strings
      for i, label in enumerate(class_labels):
          if isinstance(label, bytes):
              class_labels[i] = label.decode("utf8")
  
      image_input = ct.ImageType(
          shape=(
              1,
              224,
              224,
              3,
          ),
          bias=[-1, -1, -1],
          scale=1 / 127,
      )
  
      # set class labels
      classifier_config = ct.ClassifierConfig(class_labels)
  
      # Convert the model using the Unified Conversion API
      model = ct.convert(
          keras_model,
          inputs=[image_input],
          classifier_config=classifier_config,
      )
  
      # Set feature descriptions (these show up as comments in XCode)
      model.input_description[
          "input_1"
      ] = "Input image to be classified"
      model.output_description[
          "classLabel"
      ] = "Most likely image category"
      model.author = (
          "Original Paper: Mark Sandler, Andrew Howard, "
          "Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen"
      )
      model.license = (
          "Please see https://github.com/tensorflow/tensorflow "
          "for license information, and "
          "https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet"
          "for the original source of the model."
      )
      model.short_description = (
          "Detects the dominant objects present in an"
          "image from a set of 1001 categories such as trees, animals,"
          "food, vehicles, person etc. The top-1 accuracy"
          " from the original publication is 74.7%."
      )
      model.version = "2.0"
  
      # get an image
      from PIL import Image
      import requests
      from io import BytesIO
  
      img_url = "https://files.readme.io/02e3586-daisy.jpg"
      response = requests.get(img_url)
      img = Image.open(BytesIO(response.content))
  
      # Use PIL to load and resize the image to expected size
      example_image = img.resize((224, 224))
  
      # Make a prediction using Core ML
      out_dict = model.predict({"input_1": example_image})
  
      # Print out top-1 prediction
      assert out_dict["classLabel"] == "daisy"
  
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 9 for calling the TestTensorFlow2ConverterExamples obj's underlying member method code with example usage: obj.test_quickstart_example() without return types