def to_son(self, value): value = decimal.Decimal(value) return six.u(str(value.quantize(self.precision, rounding=self.rounding)))