code: def test_should_be_serializable(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):
          pass
  
      @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
      parser.persist(self.tmp_file_path)
  
      # Then
      expected_parser_config = {
          "unit_name": "probabilistic_intent_parser",
          "slot_filler_config": {"unit_name": "my_slot_filler"},
          "intent_classifier_config": {
              "unit_name": "my_intent_classifier"
          },
      }
      expected_parser_dict = {
          "config": expected_parser_config,
          "slot_fillers": [
              {
                  "intent": "MakeCoffee",
                  "slot_filler_name": "slot_filler_0",
              },
              {
                  "intent": "MakeTea",
                  "slot_filler_name": "slot_filler_1",
              },
          ],
      }
      metadata = {
          "unit_name": "probabilistic_intent_parser",
      }
      metadata_slot_filler = {
          "unit_name": "my_slot_filler",
          "fitted": True,
      }
      metadata_intent_classifier = {
          "unit_name": "my_intent_classifier",
          "fitted": True,
      }
  
      self.assertJsonContent(
          self.tmp_file_path / "metadata.json", metadata
      )
      self.assertJsonContent(
          self.tmp_file_path / "intent_parser.json",
          expected_parser_dict,
      )
      self.assertJsonContent(
          self.tmp_file_path / "intent_classifier" / "metadata.json",
          metadata_intent_classifier,
      )
      self.assertJsonContent(
          self.tmp_file_path / "slot_filler_0" / "metadata.json",
          metadata_slot_filler,
      )
      self.assertJsonContent(
          self.tmp_file_path / "slot_filler_1" / "metadata.json",
          metadata_slot_filler,
      )
  
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 15 for calling the TestProbabilisticIntentParser obj's underlying member method code with example usage: obj.test_should_be_serializable() without return types