class_docstr: A hooks that restored variables from a given checkpoints.
  
  Params:
    prefix: Variables matching this prefix are restored.
    checkpoint_path: Path to the checkpoint to restore variables from.
code: def begin(self):
      variables = tf.contrib.framework.get_variables(
          scope=self.params["prefix"]
      )
  
      def varname_in_checkpoint(name):
          """Removes the prefix from the variable name."""
          prefix_parts = self.params["prefix"].split("/")
          checkpoint_prefix = "/".join(prefix_parts[:-1])
          return name.replace(checkpoint_prefix + "/", "")
  
      target_names = [
          varname_in_checkpoint(_.op.name) for _ in variables
      ]
      restore_map = {k: v for k, v in zip(target_names, variables)}
  
      tf.logging.info(
          "Restoring variables: \n%s",
          yaml.dump({k: v.op.name for k, v in restore_map.items()}),
      )
  
      self._saver = tf.train.Saver(restore_map)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import abc
  import os
  import numpy
  import six
  import yaml
  import tensorflow
  from tensorflow.python.training.basic_session_run_hooks import SecondOrStepTimer
  from tensorflow.python.training import session_manager
  from tensorflow.python.client import timeline
  from tensorflow import gfile
  from seq2seq.configurable import Configurable, abstractstaticmethod
  from seq2seq import graph_utils, global_vars
label_desc: Use image node_id 3 for calling the VariableRestoreHook obj's underlying member method code with example usage: obj.begin() and returns: name