def _get_checkpoint_filename(ckpt_dir_or_file):
    'Returns checkpoint filename given directory or specific checkpoint file.'
    if gfile.IsDirectory(ckpt_dir_or_file):
        return checkpoint_management.latest_checkpoint(ckpt_dir_or_file)
    return ckpt_dir_or_file
Returns checkpoint filename given directory or specific checkpoint file.
def _get_checkpoint_filename(ckpt_dir_or_file):
    
    if gfile.IsDirectory(ckpt_dir_or_file):
        return checkpoint_management.latest_checkpoint(ckpt_dir_or_file)
    return ckpt_dir_or_file