def object_session(instance):

    try:
        return _state_session(attributes.instance_state(instance))
    except exc.NO_STATE:
        raise exc.UnmappedInstanceError(instance)
Return the ``Session`` to which instance belongs.
dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/packages/sqlalchemy/orm/session.py/object_session