code: def checkpoint_path(path):
      i = path.rfind(".ckpt")
      if i < 0:
          raise FileNotFoundError(
              "File path '{}' does not contain ckpt.".format(path)
          )
  
      return path[: i + 5]
  
imports: import os
label_desc: Use image node_id 4 for calling a global function with example usage: checkpoint_path(path) and returns: path