def METHOD_NAME(self):
    """
    preamble, sync, sequence number, length field (8 bit) and some random data
    :return:
    """
    mb = MessageTypeBuilder("easy_length_test")
    mb.add_label(FieldType.Function.PREAMBLE, 16)
    mb.add_label(FieldType.Function.SYNC, 16)
    mb.add_label(FieldType.Function.LENGTH, 8)
    mb.add_label(FieldType.Function.SEQUENCE_NUMBER, 8)
    num_messages_by_data_length = {32: 10, 64: 15, 16: 5, 24: 7}
    pg = ProtocolGenerator([mb.message_type],
                           preambles_by_mt={mb.message_type: "10" * 8},
                           syncs_by_mt={mb.message_type: "0xcafe"})
    for data_length, num_messages in num_messages_by_data_length.items():
        for i in range(num_messages):
            if i % 4 == 0:
                data = "1" * data_length
            elif i % 4 == 1:
                data = "0" * data_length
            elif i % 4 == 2:
                data = "10" * (data_length // 2)
            else:
                data = "01" * (data_length // 2)
            pg.generate_message(data=data)
    #self.save_protocol("easy_length", pg)
    self.clear_message_types(pg.protocol.messages)
    ff = FormatFinder(pg.protocol.messages)
    length_engine = LengthEngine(ff.bitvectors)
    highscored_ranges = length_engine.find(n_gram_length=8)
    self.assertEqual(len(highscored_ranges), 4)
    ff.perform_iteration()
    self.assertEqual(len(ff.message_types), 1)
    self.assertGreater(len(ff.message_types[0]), 0)
    label = ff.message_types[0].get_first_label_with_type(FieldType.Function.LENGTH)
    self.assertIsInstance(label, ProtocolLabel)
    self.assertEqual(label.start, 32)
    self.assertEqual(label.length, 8)