def rate(self, currency):
if currency == self.base:<EOL><INDENT>rate = <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>rate = self._rates.get(currency, None)<EOL><DEDENT>if rate:<EOL><INDENT>return Decimal(rate)<EOL><DEDENT>
Returns the rate of exchange from base -> currency.