def nickel_round(value, quant=Decimal('0.05'), rounding=ROUND_HALF_UP):
 assert isinstance(value, Decimal)
 assert isinstance(quant, Decimal)
 return ((value / quant).quantize(1, rounding=rounding) * quant)

def nickel_round ( value , quant = Decimal ( '0.05' ) , rounding = ROUND_HALF_UP ) : assert isinstance ( value , Decimal ) assert isinstance ( quant , Decimal ) return ( ( value / quant ) . quantize ( 1 , rounding = rounding ) * quant )
round decimal value to nearest quant .