def dicts_are_consistent(d1: dict, d2: dict) -> bool:
    """
    checks if all items whose keys are in (d1 and d2) are equal.
    returns bool.
    """
    
    return all(d1[k] == d2[k] for k in set(d1).intersection(set(d2)))