code: def test_should_get_slots(self):
      # Given
      slots_dataset_stream = io.StringIO(
          """
  ---
  type: intent
  name: greeting1
  utterances:
    - Hello [name1](John)
  
  ---
  type: intent
  name: greeting2
  utterances:
    - Hello [name2](John)
  
  ---
  type: intent
  name: greeting3
  utterances:
    - Hello John"""
      )
      dataset = Dataset.from_yaml_files(
          "en", [slots_dataset_stream]
      ).json
      parser = ProbabilisticIntentParser().fit(dataset)
  
      # When
      slots_greeting1 = parser.get_slots("Hello John", "greeting1")
      slots_greeting2 = parser.get_slots("Hello John", "greeting2")
      slots_goodbye = parser.get_slots("Hello John", "greeting3")
  
      # Then
      self.assertEqual(1, len(slots_greeting1))
      self.assertEqual(1, len(slots_greeting2))
      self.assertEqual(0, len(slots_goodbye))
  
      self.assertEqual("John", slots_greeting1[0][RES_VALUE])
      self.assertEqual("name1", slots_greeting1[0][RES_ENTITY])
      self.assertEqual("John", slots_greeting2[0][RES_VALUE])
      self.assertEqual("name2", slots_greeting2[0][RES_ENTITY])
  
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 5 for calling the TestProbabilisticIntentParser obj's underlying member method code with example usage: obj.test_should_get_slots() without return types