code: def export(checkpoint, destination, use_tf_sampling):
      model = None
      if use_tf_sampling:
          model = lib_tfsampling.CoconetSampleGraph(checkpoint)
          model.instantiate_sess_and_restore_checkpoint()
      else:
          model = lib_graph.load_checkpoint(checkpoint)
      tf.logging.info("Loaded graph.")
      lib_saved_model.export_saved_model(
          model,
          destination,
          [tf.saved_model.tag_constants.SERVING],
          use_tf_sampling,
      )
  
imports: from magenta.models.coconet import lib_graph
  from magenta.models.coconet import lib_saved_model
  from magenta.models.coconet import lib_tfsampling
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: export(checkpoint, destination, use_tf_sampling) without return types