code: def export_model(module_spec, class_count, saved_model_dir):
      """Exports model for serving.
  
      Args:
        module_spec: The hub.ModuleSpec for the image module being used.
        class_count: The number of classes.
        saved_model_dir: Directory in which to save exported model and variables.
      """
      # The SavedModel should hold the eval graph.
      sess, in_image, _, _, _, _ = build_eval_session(
          module_spec, class_count
      )
      with sess.graph.as_default() as graph:
          tf.saved_model.simple_save(
              sess,
              saved_model_dir,
              inputs={"image": in_image},
              outputs={
                  "prediction": graph.get_tensor_by_name(
                      "final_result:0"
                  )
              },
              legacy_init_op=tf.group(
                  tf.tables_initializer(), name="legacy_init_op"
              ),
          )
  
imports: from absl import logging
  import argparse
  import collections
  from datetime import datetime
  import hashlib
  import os.path
  import random
  import re
  import sys
  import numpy
  import tensorflow
  import tensorflow_hub
  from tensorflow.contrib import quantize
label_desc: Use image node_id 22 for calling a global function with example usage: export_model(module_spec, class_count, saved_model_dir) without return types