def METHOD_NAME(cls, data: bytes) -> M:
    # print('decode', data.hex(' '))
    klass = cls.msg_types[data[12]]
    values = {}
    for field_ in fields(klass):
        values[field_.name], data = field_.metadata['format'].METHOD_NAME(data)
    values.pop('msg_id')
    return klass(**values)