def METHOD_NAME(request: Request, ogc_server_ids: Iterable[int]) -> dict[int, DeclarativeMeta]:
    """Get the writable layers."""
    from c2cgeoportal_commons.models import DBSession  # pylint: disable=import-outside-toplevel
    q = get_writable_layers_query(request, ogc_server_ids)
    results = q.all()
    DBSession.expunge_all()
    return {r.id: r for r in results}