def make_most_abundant(seqs):
 seq_to_group = unique_id_map(seqs)
 groups = invert_dict(seq_to_group)
 def most_abundant(ids, seqs='ignored'):
  'Returns most abundant seq from ids'
  id_groups = [len(groups[seq_to_group[i]]) for i in ids]
  return ids[argmax(id_groups)]
 return most_abundant

def make_most_abundant ( seqs ) : seq_to_group = unique_id_map ( seqs ) groups = invert_dict ( seq_to_group ) def most_abundant ( ids , seqs = 'ignored' ) : id_groups = [ len ( groups [ seq_to_group [ i ] ] ) for i in ids ] return ids [ argmax ( id_groups ) ] return most_abundant
makes function that chooses the most abundant seq from group .