''

@classmethod
def _events_to_sync_objects(cls, all_references, from_obj, to_obj, value_refs):

    from_keys = set(from_obj['attributes'].keys())
    to_keys = set(to_obj['attributes'].keys())
    removed = (from_keys - to_keys)
    added = (to_keys - from_keys)
    shared = (from_keys & to_keys)
    events = []
    for key in removed:
        raise RuntimeError(('internal    error:    should    not    be    possible    to    delete    attribute    %s' % key))
    for key in added:
        new_value = to_obj['attributes'][key]
        events.append(Document._event_for_attribute_change(all_references, from_obj, key, new_value, value_refs))
    for key in shared:
        old_value = from_obj['attributes'].get(key)
        new_value = to_obj['attributes'].get(key)
        if ((old_value is None) and (new_value is None)):
            continue
        if ((old_value is None) or (new_value is None) or (old_value != new_value)):
            event = Document._event_for_attribute_change(all_references, from_obj, key, new_value, value_refs)
            events.append(event)
    return events
