def longest_id(ids, seqs):
 lengths = map(len, [seqs.get(id_, '') for id_ in ids])
 return ids[argmax(lengths)]

def longest_id ( ids , seqs ) : lengths = map ( len , [ seqs . get ( id_ , '' ) for id_ in ids ] ) return ids [ argmax ( lengths ) ]
chooses the longest seq from all seqs .