code: def round(self, ndigits=0):
          
          if ndigits is None:
              ndigits = 0
          return self.__class__(
              amount=self.amount.quantize(Decimal('1e' + str(-ndigits))),
              currency=self.currency)
docs: Rounds the amount using the current ``Decimal`` rounding algorithm.