code: def save_tf_checkpoint(sess, checkpoint_path, saver=None):
      """
      Save tf checkpoint without using native tensorflow remote access method.
      :param sess: tf session to be saved.
      :param checkpoint_path: checkpoint path. Could be local, hdfs, s3 filesystems.
      :param saver: tf saver to save checkpoint
      """
      import tensorflow as tf
  
      if is_local_path(checkpoint_path):
          if saver is None:
              saver = tf.train.Saver()
          saver.save(sess, checkpoint_path)
      else:
          ckpt_name = os.path.basename(checkpoint_path)
          remote_dir = os.path.dirname(checkpoint_path)
          # save to local checkpoint
          temp = tempfile.mkdtemp()
          if saver is None:
              saver = tf.train.Saver()
          saver.save(sess, os.path.join(temp, ckpt_name))
          change_path_in_tf_checkpoint(
              os.path.join(temp, "checkpoint"), ckpt_name
          )
          # move to remote
          [
              put_local_file_to_remote(
                  os.path.join(temp, file),
                  os.path.join(remote_dir, file),
                  over_write=True,
              )
              for file in os.listdir(temp)
          ]
          shutil.rmtree(temp)
  
file_path: BigDL/python/dllib/src/bigdl/dllib/utils/tf.py
imports: import os
  import json
  import copy
  import tempfile
  import re
  import shutil
  from bigdl.dllib.utils.file_utils import put_local_file_to_remote, get_remote_file_to_local, get_file_list, is_local_path
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 9 for calling a global function with example usage: save_tf_checkpoint(sess, checkpoint_path, saver) without return types