code: def load_from_checkpoint(self, sess, latest_filename=None):
      
      # Set list of not-yet-deleted checkpoints.
      self._create_initializers()
      if self._save_path:
        ckpt = tf.train.get_checkpoint_state(
            os.path.dirname(self._save_path), latest_filename)
        if ckpt and ckpt.all_model_checkpoint_paths:
          # Copy it because last_checkpoints is immutable.
          # Manually configure a new Saver so that we get the latest snapshots.
          self._saver = tf.train.Saver(saver_def=self._saver.as_saver_def())
          self._saver.set_last_checkpoints(list(ckpt.all_model_checkpoint_paths))
      if self._saver.last_checkpoints:
        self._saver.restore(sess, self._saver.last_checkpoints[-1])
        return self._saver.last_checkpoints[-1]
      else:
        return None
docs: Loads the model from the most recent checkpoint.
  
      This gets the most current list of checkpoints each time it is called.
  
      Args:
        sess: The current session.
        latest_filename: The filename for the latest set of checkpoints, defaults
          to 'checkpoints'.
      Returns:
        The loaded checkpoint or None if it failed to load.