class_docstr: Graph for Gibbs sampling from Coconet.
docstr: Instantiates session and restores from self.chkpt_path.
docstr_tok: ["Instantiates","session","and","restores","from","self.chkpt_path","."]
code: def instantiate_sess_and_restore_checkpoint(self):
      """Instantiates session and restores from self.chkpt_path."""
      if self.samples is None:
          self.build_sample_graph()
      sess = tf.Session()
      saver = tf.train.Saver()
      chkpt_fpath = tf.train.latest_checkpoint(self.chkpt_path)
      tf.logging.info("loading checkpoint %s", chkpt_fpath)
      saver.restore(sess, chkpt_fpath)
      tf.get_variable_scope().reuse_variables()
      self.sess = sess
      return self.sess
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  from magenta.models.coconet import lib_graph
  from magenta.models.coconet import lib_hparams
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the CoconetSampleGraph obj's underlying member method code with example usage: obj.instantiate_sess_and_restore_checkpoint() and returns: self