<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def convert(self, money, to_currency, date=None):
 """Convert the given ``money`` to ``to_currency`` using exchange rate on ``date`` If ``date`` is omitted then the date given by ``money.date`` will be used. """

        if str(money.currency) == str(to_currency):
            return copy.copy(money)
        return Money(
            amount=money.amount
            * self.rate(money.currency, to_currency, date or datetime.date.today()),
            currency=to_currency,
        )