def is_valid(self, bundle, request=None):
        errors = {}

        if bundle.data not in 'data' or not bundle.data['data']:
            errors['data'] = [_('The data field is required.')]

        if 'external_id' in bundle.data:
            if not isinstance(bundle.data['external_id'], basestring):
                errors['external_id'] = [_('external_id must be a string.')]
            elif not re.match('^[\w\d_-]+$', bundle.data['external_id']):
                errors['external_id'] = [_('external_id can only contain letters, numbers, underscores and dashes.')]

        return errors
dataset/ETHPy150Open pandaproject/panda/panda/api/data.py/DataValidation.is_valid/swapped operands of `not in`