r"""Return the :class:`.Session` to which an object belongs. .. container:: class_bases Proxied for the :class:`_orm.Session` class on behalf of the :class:`_orm.scoping.scoped_session` class. This is an alias of :func:`.object_session`.
(cls, instance: object)
| 2182 | |
| 2183 | @classmethod |
| 2184 | def object_session(cls, instance: object) -> Optional[Session]: |
| 2185 | r"""Return the :class:`.Session` to which an object belongs. |
| 2186 | |
| 2187 | .. container:: class_bases |
| 2188 | |
| 2189 | Proxied for the :class:`_orm.Session` class on |
| 2190 | behalf of the :class:`_orm.scoping.scoped_session` class. |
| 2191 | |
| 2192 | This is an alias of :func:`.object_session`. |
| 2193 | |
| 2194 | |
| 2195 | """ # noqa: E501 |
| 2196 | |
| 2197 | return Session.object_session(instance) |
| 2198 | |
| 2199 | @classmethod |
| 2200 | def identity_key( |
no outgoing calls