def get_engine_from_session(dbsession: Session) -> Engine:
    """
    Gets the SQLAlchemy :class:`Engine` from a SQLAlchemy :class:`Session`.
    """
    engine = dbsession.bind
    assert isinstance(engine, Engine)
    return engine
Gets the SQLAlchemy :class:`Engine` from a SQLAlchemy :class:`Session`.