def average_by_label(X, y, ref_label):
<EOL>return defaultdict(float,<EOL>pd.DataFrame.from_records(<EOL>filter_by_label(X, y, ref_label)[<NUM_LIT:0>]<EOL>).mean().to_dict())<EOL>
Calculates average dictinary from list of dictionary for give label

:param List[Dict] X: dataset
:param list y: labels
:param ref_label: reference label