def _get_subdict(dict_one, dict_two):
    """Function to get subdictionary from dict_one based on keys in dict_two
    :param dict_one: dict to select subdictionary from
    :param dict_two: dict, its keys are used to select entries from dict_one
    :return: selected subdictionary
    """
    sub_dict = {k: dict_one[k] for k in dict_two.keys() if k in dict_one}
    return sub_dict