Serializer that uses ormsgpack, with optional fallbacks.
Security note: This serializer is intended for use within the BaseCheckpointSaver
class and called within the Pregel loop. It should not be used on untrusted
python objects. If an attacker can write directly to your checkpoint database,
they may be able to trigger code execution when data is deserialized.
JsonPlusSerializer(
self,
*,
pickle_fallback: bool = False,
allowed_json_modules: Iterable[tuple[str, ...]] | Literal[True] | None = None,
allowed_msgpack_modules: AllowedMsgpackModules | Literal[True] | None = _lg_msgpack._SENTINEL,
__unpack_ext_hook__: Callable[[int, bytes], Any] | None = None
)