<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_transaction(self, amount, subaccount=None, metadata=None):
 """ Add a new transaction to the account. Parameters amount : float Negative for withdrawls, positive for deposits. subaccount : object, optional Any indicator of a subaccount to which this transaction applies. metadata : dict, optional Any extra metadata to record with the transaction. (E.g. Info about where the money is coming from or going.) May not contain keys 'amount' or 'subaccount'. """

        metadata = metadata or {}
        self.transactions.append(Transaction(amount, subaccount, metadata))
        self.balance += amount