def cleanup_choice(rule, lst):
    if len(lst) == 0: return Sequence(rule, [])
    if len(lst) <= 1: return lst[0]
    return parsetree.Choice(rule, *tuple(lst))
dataset/ETHPy150Open smurfix/yapps/yapps/grammar.py/cleanup_choice/operator `==` -> `<=`