parameters: (base_dir, parser)
return_statement: return sorted(paths)
docstring: Gets a list of Paths in a given directory.
  
    Args:
      base_dir: directory.
      parser: a function which gets the raw Path and can augment it with
        information such as the export_version, or ignore the path by returning
        None.  An example parser may extract the export version from a path
        such as "/tmp/exports/100" an another may extract from a full file
        name such as "/tmp/checkpoint-99.out".
  
    Returns:
      A list of Paths contained in the base directory with the parsing function
      applied.
      By default the following fields are populated,
        - Path.path
      The parsing function is responsible for populating,
        - Path.export_version
docstring_summary: Gets a list of Paths in a given directory.
docstring_tokens: Gets a list of Paths in a given directory .
function: def get_paths(base_dir, parser):
    """Gets a list of Paths in a given directory.
  
    Args:
      base_dir: directory.
      parser: a function which gets the raw Path and can augment it with
        information such as the export_version, or ignore the path by returning
        None.  An example parser may extract the export version from a path
        such as "/tmp/exports/100" an another may extract from a full file
        name such as "/tmp/checkpoint-99.out".
  
    Returns:
      A list of Paths contained in the base directory with the parsing function
      applied.
      By default the following fields are populated,
        - Path.path
      The parsing function is responsible for populating,
        - Path.export_version
    """
    raw_paths = gfile.ListDirectory(base_dir)
    paths = []
    for r in raw_paths:
      p = parser(Path(os.path.join(base_dir, r), None))
      if p:
        paths.append(p)
    return sorted(paths)
function_tokens: def get_paths ( base_dir , parser ) : raw_paths = gfile . ListDirectory ( base_dir ) paths = [ ] for r in raw_paths : p = parser ( Path ( os . path . join ( base_dir , r ) , None ) ) if p : paths . append ( p ) return sorted ( paths )