def sanitize_choices(choices, choices_all):
    seen = set()
    others = [x for x in choices_all if x not in choices]
    res = []
    for s in choices:
        if s in list(choices_all) + ['*']:
            if not (s in seen or seen.add(s)):
                res.extend(list(others) if s == '*' else [s])
    return res
Testing Round-Half-Even (Banker's rounding)
dataset/ETHPy150Open beetbox/beets/beets/plugins.py/sanitize_choices--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Babel-0.9.6/babel/tests/numbers.py/FormatDecimalTestCase.test_default_rounding