def prepare_results(number_of_results): stats = pstats.Stats(STATS_FILENAME) stats.sort_stats('cumulative') stats.print_stats(number_of_results)