def add_transaction(self, transaction):
for item in transaction:<EOL><INDENT>if item not in self.__transaction_index_map:<EOL><INDENT>self.__items.append(item)<EOL>self.__transaction_index_map[item] = set()<EOL><DEDENT>self.__transaction_index_map[item].add(self.__num_transaction)<EOL><DEDENT>self.__num_transaction += <NUM_LIT:1><EOL>
Add a transaction.

Arguments:
    transaction -- A transaction as an iterable object (eg. ['A', 'B']).