def filter_dict(original_dict, pattern_dict):
    """
    Return a dict that contains all items of original_dict if item key is in pattern_dict.keys()
    :param original_dict:
    :param pattern_dict:
    :return:
    """
    keys = set(original_dict.keys()).intersection(pattern_dict.keys())
    return {key: original_dict[key] for key in keys}