def aggregates_per_key(history):
    """
        Aggregate values per key
    """
    
    if len(history) == 0:
        return history

    sample_entry = history[0]
    keys = list(sample_entry.keys())
    aggregates = {key: [] for key in keys}

    for entry in history:
        for key, value in entry.items():
            aggregates[key].append(value)

    return aggregates