code: def gen_ordered_statistics(transaction_manager, record):
      
      items = record.items
      for combination_set in combinations(sorted(items), len(items) - 1):
          items_base = frozenset(combination_set)
          items_add = frozenset(items.difference(items_base))
          confidence = (
              record.support / transaction_manager.calc_support(items_base))
          lift = confidence / transaction_manager.calc_support(items_add)
          yield OrderedStatistic(
              frozenset(items_base), frozenset(items_add), confidence, lift)
docs: Returns a generator of ordered statistics as OrderedStatistic instances.
  
      Arguments:
          transaction_manager -- Transactions as a TransactionManager instance.
          record -- A support record as a SupportRecord instance.