parameters: (checkpoint_dir)
return_statement: return result
docstring: Returns list of all variables in the latest checkpoint.
  
    Args:
      checkpoint_dir: Directory with checkpoints file or path to checkpoint.
  
    Returns:
      List of tuples `(name, shape)`.
docstring_summary: Returns list of all variables in the latest checkpoint.
docstring_tokens: Returns list of all variables in the latest checkpoint .
function: def list_variables(checkpoint_dir):
    """Returns list of all variables in the latest checkpoint.
  
    Args:
      checkpoint_dir: Directory with checkpoints file or path to checkpoint.
  
    Returns:
      List of tuples `(name, shape)`.
    """
    reader = load_checkpoint(checkpoint_dir)
    variable_map = reader.get_variable_to_shape_map()
    names = sorted(variable_map.keys())
    result = []
    for name in names:
      result.append((name, variable_map[name]))
    return result
function_tokens: def list_variables ( checkpoint_dir ) : reader = load_checkpoint ( checkpoint_dir ) variable_map = reader . get_variable_to_shape_map ( ) names = sorted ( variable_map . keys ( ) ) result = [ ] for name in names : result . append ( ( name , variable_map [ name ] ) ) return result