human
Solve the following python programming problem given the following code:
def compare_stats(stats1, stats2) : 
    "
    Compare performance stats output by the 'build_apps' command.
    " 
    col_widths = (60, 30, 30) 
    (header_template, row_template) = get_templates (col_widths) 
    mem_cell_template = '{%:<7,.2%} ({numerator:.0f} / {denominator:.0f})' 
    time_cell_template = '{%:<7,.2%} ({numerator:.2f} / {denominator:.2f})' 
    print (header_template.format ('App', 'Mem diff %', 'Time diff %')) 
    def print_sep() : 
        print (header_template.format (* [('-' * (width - 1)) for width in col_widths])) 
print_sep () 
    def get_stats_diff(slug, stat) : 
        stats_item1 = stats1 [slug] 
        if (slug not in stats2) : 
            return 100 
stats_item2 = stats2 [slug] 
        diff = (stats_item2 [stat] - stats_item1 [stat]) 
        percent = (float (diff) / stats_item1 [stat]) 
        return { 
            '%' : percent, 
            'numerator' : diff, 
            'denominator' : stats_item1 [stat], 
} 
def get_all_diffs(name) : 
        return [get_stats_diff (slug, name) for slug in stats1] 
all_mem = get_all_diffs ('mem') 
    all_time = get_all_diffs ('time') 
    for (slug, mem, time) in zip (stats1.keys (), all_mem, all_time) : 
        print (row_template.format (slug, mem_cell_template.format (** mem), time_cell_template.format (** time))) 
print_sep () 
    print (row_template.format ('Average', mem_cell_template.format (** avg_dict (all_mem)), time_cell_template.format (** avg_dict (stats2)))) 

    
    

    Fix the buggy line: print (row_template.format ('Average', mem_cell_template.format (** avg_dict (all_mem)), time_cell_template.format (** avg_dict (stats2))))
assistant
#Here is Python code to fix the buggy line: print (row_template.

print (row_template.format ('Average', mem_cell_template.format (** avg_dict (all_mem)), time_cell_template.format (** avg_dict (all_time))))