def upcharge(amount):
 typecheck(amount, Decimal)
 charge_amount = ((amount + FEE_CHARGE[0]) / (1 - FEE_CHARGE[1]))
 charge_amount = charge_amount.quantize(FEE_CHARGE[0], rounding=ROUND_UP)
 return (charge_amount, (charge_amount - amount))

def upcharge ( amount ) : typecheck ( amount , Decimal ) charge_amount = ( ( amount + FEE_CHARGE [ 0 ] ) / ( 1 - FEE_CHARGE [ 1 ] ) ) charge_amount = charge_amount . quantize ( FEE_CHARGE [ 0 ] , rounding = ROUND_UP ) return ( charge_amount , ( charge_amount - amount ) )
given an amount .