parameters: (dirs, filepart, candidate_fun)
return_statement: return candidates
docstring: Returns a list of candidate filenames, sorted by modification time.
  
    Args:
      dirs: a list of the directory part of the pathname.
      filepart: the file part of the pathname.
      candidate_fun: a function to apply to each candidate, returns a list.
  
    Returns:
      A list of candidate files ordered by modification time, newest first.
docstring_summary: Returns a list of candidate filenames, sorted by modification time.
docstring_tokens: Returns a list of candidate filenames sorted by modification time .
function: def GetCandidates(dirs, filepart, candidate_fun):
    """Returns a list of candidate filenames, sorted by modification time.
  
    Args:
      dirs: a list of the directory part of the pathname.
      filepart: the file part of the pathname.
      candidate_fun: a function to apply to each candidate, returns a list.
  
    Returns:
      A list of candidate files ordered by modification time, newest first.
    """
    candidates = PathListJoin(dirs, [filepart])
    logging.debug('GetCandidates: prefiltered candidates = %s' % candidates)
    candidates = list(
        itertools.chain.from_iterable(map(candidate_fun, candidates)))
    candidates.sort(key=os.path.getmtime, reverse=True)
    return candidates
function_tokens: def GetCandidates ( dirs , filepart , candidate_fun ) : candidates = PathListJoin ( dirs , [ filepart ] ) logging . debug ( 'GetCandidates: prefiltered candidates = %s' % candidates ) candidates = list ( itertools . chain . from_iterable ( map ( candidate_fun , candidates ) ) ) candidates . sort ( key = os . path . getmtime , reverse = True ) return candidates