def make_transient(instance):
    state = attributes.instance_state(instance)
    s = _state_session(state)
    if s:
        s._expunge_state(state)

    # remove expired state and
    # deferred callables
    state.callables.clear()
    if state.key:
        del state.key
    if state.deleted:
        del state.deleted
Make the given instance 'transient'.
dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/packages/sqlalchemy/orm/session.py/make_transient