def list_to_dict(list_to_convert: dict, key_name: str):
    """
    USed to convert a list of dictionaries to a dictionary using some common properties (i.e. name)
    Careful as data will be lost for duplicate entries, this assumes the list is a "set".
    :param list_to_convert: A list of dictionaries
    :param key_name: A value from each dict to use as the key.
    :return: A dictionary.
    """
    converted_dict = dict()
    if list_to_convert:
        for item in list_to_convert:
            converted_dict[item[key_name]] = item
    return converted_dict