def group_codon_usages_by_ids(codon_usages, ids, field='GeneId'):
    """Sorts codon usages into 2 lists: non-matching and matching ids."""
    result = [[],[]]
    for c in codon_usages:
        result[getattr(c, field) in ids].append(c)
    return result