from typing import List
from typing import Union
from typing import Dict


def _result_values_to_dict(treeview_headers: List[str],
                           result_values: List[Union[int, str, float]]) -> Dict[str, Union[int, str, float]]:
    """
    Turn value list into a dict according to the keys based on treeview_headers

    Parameters
    ----------
    treeview_headers
        headers that are used in tkinter treeview in order to make sure all needed values are present
    result_values
        result values that were just analysed

    Returns
    -------
    result_dict_per_id
        result values ordered to treeview_headers as key
    """
    result_dict_per_id = {}
    for key, value in zip(treeview_headers, result_values):
        result_dict_per_id[key] = value
    return result_dict_per_id