code: def load(
      tf_session, model_folder, cp_name, scope=None, verbose=False
  ):
      """Loads Tensorflow graph from checkpoint.
  
      Args:
        tf_session: Session to load graph into
        model_folder: Folder containing serialised model
        cp_name: Name of Tensorflow checkpoint
        scope: Variable scope to use.
        verbose: Whether to print additional debugging information.
      """
      # Load model proper
      load_path = os.path.join(model_folder, "{0}.ckpt".format(cp_name))
  
      print("Loading model from {0}".format(load_path))
  
      print_weights_in_checkpoint(model_folder, cp_name)
  
      initial_vars = set(
          [v.name for v in tf.get_default_graph().as_graph_def().node]
      )
  
      # Saver
      if scope is None:
          saver = tf.train.Saver()
      else:
          var_list = tf.get_collection(
              tf.GraphKeys.GLOBAL_VARIABLES, scope=scope
          )
          saver = tf.train.Saver(var_list=var_list, max_to_keep=100000)
      # Load
      saver.restore(tf_session, load_path)
      all_vars = set(
          [v.name for v in tf.get_default_graph().as_graph_def().node]
      )
  
      if verbose:
          print(
              "Restored {0}".format(
                  ",".join(initial_vars.difference(all_vars))
              )
          )
          print(
              "Existing {0}".format(
                  ",".join(all_vars.difference(initial_vars))
              )
          )
          print("All {0}".format(",".join(all_vars)))
  
      print("Done.")
  
file_path: qlib/examples/benchmarks/TFT/libs/utils.py
imports: import os
  import pathlib
  import numpy
  import tensorflow
  from tensorflow.python.tools.inspect_checkpoint import print_tensors_in_checkpoint_file
label_desc: Use image node_id 8 for calling a global function with example usage: load(tf_session, model_folder, cp_name, scope, verbose) without return types