code: def export_to_saved_model(checkpoint, alpha):
      """Export arbitrary style transfer trained checkpoints to SavedModel format.
  
      Args:
        checkpoint: str, path to the checkpoint file.
        alpha: Width Multiplier of the transform model.
  
      Returns:
        (str, str) Path to the exported style predict and style transform
        SavedModel.
      """
      saved_model_dir = tempfile.mkdtemp()
      predict_saved_model_folder = os.path.join(
          saved_model_dir, "predict"
      )
      transform_saved_model_folder = os.path.join(
          saved_model_dir, "transform"
      )
  
      with tf.Graph().as_default(), tf.Session() as sess:
          # Defines place holder for the style image.
          style_image_tensor = tf.placeholder(
              tf.float32,
              shape=[None, None, None, 3],
              name="style_image",
          )
  
          # Defines place holder for the content image.
          content_image_tensor = tf.placeholder(
              tf.float32,
              shape=[None, None, None, 3],
              name="content_image",
          )
  
          # Defines the model.
          (
              stylized_images,
              _,
              _,
              bottleneck_feat,
          ) = build_mobilenet_model.build_mobilenet_model(
              content_image_tensor,
              style_image_tensor,
              mobilenet_trainable=False,
              style_params_trainable=False,
              transformer_trainable=False,
              style_prediction_bottleneck=100,
              transformer_alpha=alpha,
              mobilenet_end_point="layer_19",
              adds_losses=False,
          )
  
          # Load model weights from  checkpoint file
          load_checkpoint(sess, checkpoint)
  
          # Write SavedModel for serving or conversion to TF Lite
          tf.saved_model.simple_save(
              sess,
              predict_saved_model_folder,
              inputs={style_image_tensor.name: style_image_tensor},
              outputs={"style_bottleneck": bottleneck_feat},
          )
          tf.logging.debug(
              "Export predict SavedModel to", predict_saved_model_folder
          )
  
          tf.saved_model.simple_save(
              sess,
              transform_saved_model_folder,
              inputs={
                  content_image_tensor.name: content_image_tensor,
                  "style_bottleneck": bottleneck_feat,
              },
              outputs={"stylized_image": stylized_images},
          )
          tf.logging.debug(
              "Export transform SavedModel to",
              transform_saved_model_folder,
          )
  
      return predict_saved_model_folder, transform_saved_model_folder
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import tempfile
  from magenta.models.arbitrary_image_stylization import arbitrary_image_stylization_build_mobilenet_model
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: export_to_saved_model(checkpoint, alpha) and returns: predict_saved_model_folder,  transform_saved_model_folder