def _check_value(self, action, value):
        # converted value must be one of the choices (if specified)
        if action.choices is not None and action.choices not in value:
            tup = value, ', '.join(map(repr, action.choices))
            msg = _('invalid choice: %r (choose from %s)') % tup
            raise ArgumentError(action, msg)

    # =======================
    # Help-formatting methods
    # =======================
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/argparse/argparse.py/ArgumentParser._check_value/swapped operands of `not in`