def METHOD_NAME(message: MessageDb) -> AlephMessage:
    message_type = message.type
    message_cls = MESSAGE_CLS_DICT[message_type]
    return message_cls.from_orm(message)  # type: ignore[return-value]