<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def total_transactions_by_subacct(self, subaccount):
 """ Get the sum of all transactions for a given subaccount. Parameters subaccount : object Identifier of subaccount. Returns ------- total : float """

        return sum(
            t.amount for t in self.transactions if t.subaccount == subaccount)