def aggregate_key(self, aggregate_key):
aggregation = self.data_dict[aggregate_key]  <EOL>data_dict_keys = {y for x in aggregation for y in x.keys()}<EOL>for key in data_dict_keys:<EOL><INDENT>stacked = np.stack([d[key] for d in aggregation], axis=<NUM_LIT:0>)<EOL>self.data_dict[key] = np.mean(stacked, axis=<NUM_LIT:0>)<EOL><DEDENT>
Aggregate values from key and put them into the top-level dictionary