code: def save_checkpoint(self):
      logdir = tempfile.mkdtemp()
      save_path = os.path.join(logdir, "model.ckpt")
  
      hparams = lib_hparams.Hyperparameters(**{})
  
      tf.gfile.MakeDirs(logdir)
      config_fpath = os.path.join(logdir, "config")
      with tf.gfile.Open(config_fpath, "w") as p:
          hparams.dump(p)
  
      with tf.Graph().as_default():
          lib_graph.build_graph(is_training=True, hparams=hparams)
          sess = tf.Session()
          sess.run(tf.global_variables_initializer())
  
          saver = tf.train.Saver()
          saver.save(sess, save_path)
  
      return logdir
  
file_path: magenta/magenta/models/coconet/export_saved_model_test.py
imports: import os
  import tempfile
  from magenta.models.coconet import export_saved_model
  from magenta.models.coconet import lib_graph
  from magenta.models.coconet import lib_hparams
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the ExportSavedModelTest obj's underlying member method code with example usage: obj.save_checkpoint() and returns: logdir