def dict_diff(dict1: Optional[dict], dict2: Optional[dict]) -> Optional[dict]:
    """Return all members of dict1 that are not in dict2 or have different values."""
    dict1 = dict1 or {}
    dict2 = dict2 or {}
    return {k: v for k, v in dict1.items() if k not in dict2 or dict2[k] != v} or None
Return all members of dict1 that are not in dict2 or have different values.
olive/common/utils.py