code: def load_tf_checkpoint(sess, checkpoint_path, saver=None):
      """
      Load tensorflow checkpoint from checkpoint path without using native tensorflow accessing
      remote method.
      :param sess: tensorflow session to be loaded to.
      :param checkpoint_path: tensorflow checkpoint path. Could be local, hdfs, s3 filesystems.
      :param saver: tensorflow saver to load checkpoint
      """
      import tensorflow as tf
  
      if is_local_path(checkpoint_path):
          if saver is None:
              saver = tf.train.Saver()
          saver.restore(sess, checkpoint_path)
      else:
          ckpt_name = os.path.basename(checkpoint_path)
          checkpoint_dir = os.path.dirname(checkpoint_path)
          # get remote file lists
          file_list = get_file_list(checkpoint_dir)
          # filter checkpoint files
          checkpoint_files = [
              file
              for file in file_list
              if os.path.basename(file).startswith(ckpt_name)
          ]
          # get checkpoint files to local
          temp = tempfile.mkdtemp()
          [
              get_remote_file_to_local(
                  file, os.path.join(temp, os.path.basename(file))
              )
              for file in checkpoint_files
          ]
          if saver is None:
              saver = tf.train.Saver()
          try:
              saver.restore(sess, os.path.join(temp, ckpt_name))
          except Exception as e:
              raise e
          finally:
              shutil.rmtree(temp)
  
file_path: analytics-zoo/pyzoo/zoo/util/tf.py
imports: import os
  import json
  import copy
  import tempfile
  import re
  import shutil
  from zoo.common.utils import put_local_file_to_remote, get_remote_file_to_local, get_file_list, is_local_path
label_desc: Use image node_id 11 for calling a global function with example usage: load_tf_checkpoint(sess, checkpoint_path, saver) without return types