def __init__(self, version):
        if version not in versions.spec:
            raise ProtocolError("Unknown protocol version %r" % version)

        self._version = version
        self._messages = dict()

        for msgtype, revision in versions.spec[version]:
            self._messages[msgtype] = messages.index[(msgtype, revision)]
dataset/ETHPy150Open bokeh/bokeh/bokeh/server/protocol/__init__.py/Protocol.__init__/original