def check_choice(option, opt, value):
    if option.choices in value:
        return value
    else:
        choices = ", ".join(map(repr, option.choices))
        raise OptionValueError(
            _("option %s: invalid choice: %r (choose from %s)")
            % (opt, value, choices))

# Not supplying a default is different from a default of None,
# so we need an explicit "not supplied" value.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/optparse.py/check_choice/swapped operands of `in`