code: def test_should_be_serializable_into_bytearray(self):
      # Given
      dataset_stream = io.StringIO(
          """
  ---
  type: intent
  name: MakeTea
  utterances:
  - make me a [beverage_temperature:Temperature](hot) cup of tea
  - make me [number_of_cups:snips/number](five) tea cups
  
  ---
  type: intent
  name: MakeCoffee
  utterances:
  - make me [number_of_cups:snips/number](one) cup of coffee please
  - brew [number_of_cups] cups of coffee"""
      )
      dataset = Dataset.from_yaml_files("en", [dataset_stream]).json
  
      # pylint:disable=unused-variable
      @IntentClassifier.register("my_intent_classifier", True)
      class MyIntentClassifier(MockIntentClassifier):
          def get_intent(self, text, intents_filter):
              if "tea" in text:
                  return intent_classification_result("MakeTea", 1.0)
              elif "coffee" in text:
                  return intent_classification_result("MakeCoffee", 1.0)
              return intent_classification_result(None, 1.0)
  
      @SlotFiller.register("my_slot_filler", True)
      class MySlotFiller(MockSlotFiller):
          pass
  
      # pylint:enable=unused-variable
  
      parser_config = ProbabilisticIntentParserConfig(
          intent_classifier_config="my_intent_classifier",
          slot_filler_config="my_slot_filler",
      )
      parser = ProbabilisticIntentParser(parser_config).fit(dataset)
  
      # When
      intent_parser_bytes = parser.to_byte_array()
      loaded_intent_parser = ProbabilisticIntentParser.from_byte_array(
          intent_parser_bytes
      )
      result = loaded_intent_parser.parse("make me two cups of tea")
  
      # Then
      self.assertEqual("MakeTea", result[RES_INTENT][RES_INTENT_NAME])
  
imports: from __future__ import unicode_literals
  import io
  from future.utils import itervalues
  from mock import patch
  from snips_nlu.constants import RES_ENTITY, RES_INTENT, RES_INTENT_NAME, RES_SLOTS, RES_VALUE, RANDOM_STATE
  from snips_nlu.dataset import Dataset
  from snips_nlu.exceptions import IntentNotFoundError, NotTrained
  from snips_nlu.intent_classifier import IntentClassifier, LogRegIntentClassifier
  from snips_nlu.intent_parser import ProbabilisticIntentParser
  from snips_nlu.pipeline.configs import CRFSlotFillerConfig, LogRegIntentClassifierConfig, ProbabilisticIntentParserConfig
  from snips_nlu.result import unresolved_slot, intent_classification_result
  from snips_nlu.slot_filler import SlotFiller
  from snips_nlu.tests.utils import FixtureTest, MockIntentClassifier, MockSlotFiller
label_desc: Use image node_id 17 for calling the TestProbabilisticIntentParser obj's underlying member method code with example usage: obj.test_should_be_serializable_into_bytearray() and returns: intent_classification_result, intent_classification_result, intent_classification_result