def print_stats():
    print('The cost of property {}:'.format(func.__name__))
    if (not memo):
        print('None since no calls')
        return
    counts = {k: sum(v.values()) for (k, v) in memo.items()}
    total = sum(counts.values())
    ids = {self_id for (self_id, _) in memo}
    print(' Total: {} calls from {} objects with {} contexts taking {:.2f} sec'.format(total, len(ids), len(memo), sum(times)))
    for ((self_id, caller), count) in sorted(counts.items(), key=(lambda x: x[1]), reverse=True):
        print('  {} {}: {} from {} lines'.format(self_id, caller, count, len(memo[(self_id, caller)])))
def print_stats():
    print('The cost of property {}:'.format(func.__name__))
    if (not memo):
        print('None since no calls')
        return
    counts = {k: sum(v.values()) for (k, v) in memo.items()}
    total = sum(counts.values())
    ids = {self_id for (self_id, _) in memo}
    print(' Total: {} calls from {} objects with {} contexts taking {:.2f} sec'.format(total, len(ids), len(memo), sum(times)))
    for ((self_id, caller), count) in sorted(counts.items(), key=(lambda x: x[1]), reverse=True):
        print('  {} {}: {} from {} lines'.format(self_id, caller, count, len(memo[(self_id, caller)])))