def serialize_data(data_dicts): """Reserialize a list of collection dictionaries.""" if len(data_dicts) == 0: return [] elif data_dicts[0]['type'] == 'HourlyContinuousCollection': return [HourlyContinuousCollection.from_dict(data) for data in data_dicts] elif data_dicts[0]['type'] == 'MonthlyCollection': return [MonthlyCollection.from_dict(data) for data in data_dicts] elif data_dicts[0]['type'] == 'DailyCollection': return [DailyCollection.from_dict(data) for data in data_dicts]
def serialize_data(data_dicts): """Reserialize a list of MonthlyCollection dictionaries.""" return [MonthlyCollection.from_dict(data) for data in data_dicts]