def buildMessageRegistry(seq, suffixes=[''], bases=(Message, )):
    for name, args in sorted(seq):
        for suffix in suffixes:
            typename = toTypeName(name) + suffix
            typens = {'__slots__':args, '__assoc__':name, 'typeName':name}
            msgtype = type(typename, bases, typens)
            if name in registry:
                registry[name] = registry[name] + (msgtype, )
            else:
                registry[name] = (msgtype, )
Construct message types and add to given mapping.
dataset/ETHPy150Open CarterBain/Medici/ib/opt/message.py/buildMessageRegistry