def parse(self, request, bundle_errors=False):
        '''
        Parses argument value(s) from the request, converting according to
        the argument's type.

        :param request: The flask request object to parse arguments from
        :param bool bundle_errors: do not abort when first error occurs, return a
            dict with the name of the argument and the error message to be
            bundled
        '''
        bundle_errors = current_app.config.get('BUNDLE_ERRORS', False) or bundle_errors
        source = self.source(request)

        results = []

        # Sentinels
        _not_found = False
        _found = True

        for operator in self.operators:
            name = self.name + operator.replace('=', '', 1)
            if name in source:
                # Account for MultiDict and regular dict
                if hasattr(source, 'getlist'):
                    values = source.getlist(name)
                else:
                    values = [source.get(name)]

                for value in values:
                    if hasattr(value, 'strip') and self.trim:
                        value = value.strip()
                    if hasattr(value, 'lower') and not self.case_sensitive:
                        value = value.lower()

                        if hasattr(self.choices, '__iter__'):
                            self.choices = [choice.lower() for choice in self.choices]

                    try:
                        value = self.convert(value, operator)
                    except Exception as error:
                        if self.ignore:
                            continue
                        return self.handle_validation_error(error, bundle_errors)

                    if self.choices and self.choices not in value:
                        msg = '{0} is not a valid choice'.format(value)
                        if bundle_errors:
                            return self.handle_validation_error(msg, bundle_errors)
                        self.handle_validation_error(msg, bundle_errors)

                    if name in request.unparsed_arguments:
                        request.unparsed_arguments.pop(name)
                    results.append(value)

        if not results and self.required:
            if isinstance(self.location, six.string_types):
                location = _friendly_location.get(self.location, self.location)
            else:
                locations = [_friendly_location.get(loc, loc) for loc in self.location]
                location = ' or '.join(locations)
            error_msg = 'Missing required parameter in {0}'.format(location)
            if bundle_errors:
                return self.handle_validation_error(error_msg, bundle_errors)
            self.handle_validation_error(error_msg, bundle_errors)

        if not results:
            if callable(self.default):
                return self.default(), _not_found
            else:
                return self.default, _not_found

        if self.action == 'append':
            return results, _found

        if self.action == 'store' or len(results) == 1:
            return results[0], _found
        return results, _found
dataset/ETHPy150Open noirbizarre/flask-restplus/flask_restplus/reqparse.py/Argument.parse/swapped operands of `not in`