code: def export_saved_model(model, destination, tags, use_tf_sampling):
      """Exports the given model as SavedModel to destination."""
      if model is None or destination is None or not destination:
          tf.logging.error("No model or destination provided.")
          return
  
      builder = tf.saved_model.builder.SavedModelBuilder(destination)
  
      signature_def_map = {
          tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY: get_signature_def(
              model, use_tf_sampling
          )
      }
  
      builder.add_meta_graph_and_variables(
          model.sess,
          tags,
          signature_def_map=signature_def_map,
          strip_default_attrs=True,
      )
      builder.save()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: export_saved_model(model, destination, tags, use_tf_sampling) without return types