code: def change_path_in_tf_checkpoint(checkpoint_path, ckpt_name):
      # change checkpoint file
      with open(checkpoint_path) as f:
          import re
  
          new_lines = []
          lines = f.readlines()
          # replace model_checkpoint_path and all_model_checkpoint_paths to checkpoint name
          #  instead of the absolute checkpoint path
          for line in lines:
              if re.compile('^model_checkpoint_path: "(.*)"$').match(
                  line
              ):
                  new_lines.append(
                      'model_checkpoint_path: "{}"\n'.format(ckpt_name)
                  )
              elif re.compile(
                  '^all_model_checkpoint_paths: "(.*)"$'
              ).match(line):
                  new_lines.append(
                      'all_model_checkpoint_paths: "{}"\n'.format(
                          ckpt_name
                      )
                  )
              else:
                  new_lines.append(line)
      with open(checkpoint_path, "w") as f:
          f.writelines(new_lines)
  
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 8 for calling a global function with example usage: change_path_in_tf_checkpoint(checkpoint_path, ckpt_name) without return types