def _add_to_batch_list(self, TX, payment):
batch_key = payment['<STR_LIT:type>'] + "<STR_LIT>" + payment['<STR_LIT>']<EOL>if batch_key in self._batches.keys():<EOL><INDENT>self._batches[batch_key].append(TX['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>self._batches[batch_key] = []<EOL>self._batches[batch_key].append(TX['<STR_LIT>'])<EOL><DEDENT>if batch_key in self._batch_totals:<EOL><INDENT>self._batch_totals[batch_key] += payment['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>self._batch_totals[batch_key] = payment['<STR_LIT>']<EOL><DEDENT>
Method to add a transaction to the batch list. The correct batch will
be determined by the payment dict and the batch will be created if
not existant. This will also add the payment amount to the respective
batch total.