human
Solve the following python programming problem given the following code:
def avg_dict(data) : 
    def vals_by_key(key, vals) : 
        return [item [key] for item in vals] 
return { key : avg (vals_by_key (data, data)) for key in ['%', 'numerator', 'denominator'] } 

    
    

    Fix the buggy line: return { key : avg (vals_by_key (data, data)) for key in ['%', 'numerator', 'denominator'] }
assistant
#Here is Python program to fix the buggy line: return { key : avg (vals_by_key (data, data)) for key in ['%', 'numerator', 'denominator'] }
.

return { key : avg (vals_by_key (key, data)) for key in ['%', 'numerator', 'denominator'] }