from collections.abc import Callable from .specs import MsgDict _SPECIAL_CASES: dict[str, Callable[[MsgDict], list[object]]] def encode_message(msg: MsgDict) -> list[int]: """Encode msg dict as a list of bytes. TODO: Add type and value checking. (Can be turned off with keyword argument.) This is not a part of the public API. """