def is_modified(self, instance, include_collections=True,
                    passive=True):
        state = object_state(instance)

        if not state.modified:
            return False

        dict_ = state.dict

        for attr in state.manager.attributes:
            if \
                    (
                        not include_collections and
                        hasattr(attr.impl, 'get_collection')
                    ) or not hasattr(attr.impl, 'get_history'):
                continue

            (added, unchanged, deleted) = \
                attr.impl.get_history(state, dict_,
                                      passive=attributes.NO_CHANGE)

            if added or deleted:
                return True
        else:
            return False
Return ``True`` if the given instance has locally
dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/packages/sqlalchemy/orm/session.py/Session.is_modified