from typing import OrderedDict


def order_dict_by_list_of_keys(dict_to_order, keys):
    """
    Order dictionary taking into account the order of the keys in a list
    :param dict_to_order: dict
    :param keys: list(str)
    :return: dict
    """

    return OrderedDict([(key, dict_to_order[key]) for key in keys if key in dict_to_order])