'Provided for userland code that uses attributes.get_history().'

def get_history(self, state, dict_, passive=attributes.PASSIVE_OFF):

    added = []
    deleted = []
    has_history = False
    for prop in self.props:
        key = prop.key
        hist = state.manager[key].impl.get_history(state, dict_)
        if hist.has_changes():
            has_history = True
        non_deleted = hist.non_deleted()
        if non_deleted:
            added.extend(non_deleted)
        else:
            added.append(None)
        if hist.deleted:
            deleted.extend(hist.deleted)
        else:
            deleted.append(None)
    if has_history:
        return attributes.History([self.composite_class(*added)], (), [self.composite_class(*deleted)])
    else:
        return attributes.History((), [self.composite_class(*added)], ())
