code: def _GetCheckpointFilename(save_dir, latest_filename):
      """Returns a filename for storing the CheckpointState.
  
      Args:
        save_dir: The directory for saving and restoring checkpoints.
        latest_filename: Name of the file in 'save_dir' that is used
          to store the CheckpointState.
  
      Returns:
        The path of the file that contains the CheckpointState proto.
      """
      if latest_filename is None:
          latest_filename = "checkpoint"
      return os.path.join(save_dir, latest_filename)
  
imports: import collections
  import copy
  import os.path
  import re
  import time
  from google.protobuf import text_format
  from tensorflow.core.protobuf import saver_pb2
  from tensorflow.python.checkpoint import checkpoint_options
  from tensorflow.python.eager import context
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import training_util
  from tensorflow.python.training.checkpoint_state_pb2 import CheckpointState
  from tensorflow.python.util import compat
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 2 for calling a global function with example usage: _GetCheckpointFilename(save_dir, latest_filename) and returns: os