code: def add_transaction(self, transaction):
          
          for item in transaction:
              if item not in self.__transaction_index_map:
                  self.__items.append(item)
                  self.__transaction_index_map[item] = set()
              self.__transaction_index_map[item].add(self.__num_transaction)
          self.__num_transaction += 1
docs: Add a transaction.
  
          Arguments:
              transaction -- A transaction as an iterable object (eg. ['A', 'B']).