def dic_cmp(dic1, dic2):
    """Compare dictionaries"""
    d1_keys_ = set(dic1.keys())
    d2_keys_ = set(dic2.keys())
    intersect_keys_ = d1_keys_.intersection(d2_keys_)
    added_ = d1_keys_ - d2_keys_
    removed_ = d2_keys_ - d1_keys_
    modified_ = []
    same_ = []
    for k_ in intersect_keys_:
        if dic1[k_] == dic2[k_]:
            same_.append(k_)
        else:
            modified_.append({k_: (dic1[k_], dic2[k_])})
    return added_, removed_, modified_, same_
