def validate(self, value, required=True):
            value = super(SetProperty, self).validate(value, required=required)
            if value and value is not None:
                if not isinstance(value, MutableSet):
                    raise BadValueError('Property %s must be a set' % self.name)
                value = self.validate_set_contents(value)
            return value
dataset/ETHPy150Open benoitc/couchdbkit/couchdbkit/schema/properties.py/SetProperty.validate/original