from typing import List
from typing import Dict
from typing import Any


def convert_timeline_to_diary(timeline: List[Dict[str, Any]]) -> Dict[str, Any]:
    """
    Converts a list of logged data into a Dict[str, Any] containing lists of
    data instead of singular values, or in other words a diary.

    :param timeline:
        A List[Dict[str, Any]] containing the logged metrics you wish to
        flatten into a diary dictionary.


    :return:
        A Dict[str, Any] representing the diary dictionary.
    """
    to_return = dict()

    for time_stamp in timeline:
        for metric, value in time_stamp.items():
            if metric not in to_return:
                to_return[metric] = list()

            to_return[metric].append(value)

    return to_return