code: def test_should_be_serializable(self, mock_get_stop_words):
      # Given
      dataset_stream = io.StringIO(
          """
  ---
  type: intent
  name: searchFlight
  slots:
    - name: origin
      entity: city
    - name: destination
      entity: city
  utterances:
    - find me a flight from [origin](Paris) to [destination](New York)
    - I need a flight to [destination](Berlin)
  
  ---
  type: entity
  name: city
  values:
    - london
    - [new york, big apple]
    - [paris, city of lights]
              """
      )
  
      dataset = Dataset.from_yaml_files("en", [dataset_stream]).json
  
      mock_get_stop_words.return_value = {"a", "me"}
      config = DeterministicIntentParserConfig(
          max_queries=42, max_pattern_length=100, ignore_stop_words=True
      )
      parser = DeterministicIntentParser(config=config).fit(dataset)
  
      # When
      parser.persist(self.tmp_file_path)
  
      # Then
      expected_dict = {
          "config": {
              "unit_name": "deterministic_intent_parser",
              "max_queries": 42,
              "max_pattern_length": 100,
              "ignore_stop_words": True,
          },
          "language_code": "en",
          "group_names_to_slot_names": {
              "group0": "destination",
              "group1": "origin",
          },
          "patterns": {
              "searchFlight": [
                  "^\\s*find\\s*flight\\s*from\\s*(?P<group1>%CITY%)\\s*to"
                  "\\s*(?P<group0>%CITY%)\\s*$",
                  "^\\s*i\\s*need\\s*flight\\s*to\\s*(?P<group0>%CITY%)"
                  "\\s*$",
              ]
          },
          "slot_names_to_entities": {
              "searchFlight": {
                  "destination": "city",
                  "origin": "city",
              }
          },
          "stop_words_whitelist": dict(),
      }
      metadata = {"unit_name": "deterministic_intent_parser"}
      self.assertJsonContent(
          self.tmp_file_path / "metadata.json", metadata
      )
      self.assertJsonContent(
          self.tmp_file_path / "intent_parser.json", expected_dict
      )
  
imports: from __future__ import unicode_literals
  import io
  from builtins import range
  from copy import deepcopy
  from checksumdir import dirhash
  from mock import patch
  from snips_nlu.common.io_utils import temp_dir
  from snips_nlu.constants import DATA, END, ENTITY, LANGUAGE_EN, RES_ENTITY, RES_INTENT, RES_INTENT_NAME, RES_PROBA, RES_SLOTS, RES_VALUE, SLOT_NAME, START, TEXT, STOP_WORDS
  from snips_nlu.dataset import Dataset
  from snips_nlu.exceptions import IntentNotFoundError, NotTrained
  from snips_nlu.intent_parser.deterministic_intent_parser import DeterministicIntentParser, _deduplicate_overlapping_slots, _get_range_shift
  from snips_nlu.pipeline.configs import DeterministicIntentParserConfig
  from snips_nlu.result import extraction_result, intent_classification_result, unresolved_slot, empty_result, parsing_result
  from snips_nlu.tests.utils import FixtureTest, TEST_PATH
label_desc: Use image node_id 24 for calling the TestDeterministicIntentParser obj's underlying member method code with example usage: obj.test_should_be_serializable(mock_get_stop_words) without return types