code: def test_generate_utterance(self):
      # Given
      context = {
          "data": [
              {
                  "text": "this is ",
              },
              {
                  "text": "entity 11",
                  "entity": "entity1",
                  "slot_name": "slot1",
              },
              {"text": " right "},
              {
                  "text": "entity 2",
                  "entity": "entity2",
                  "slot_name": "slot1",
              },
          ]
      }
      context_iterator = (context for _ in range(1))
  
      entities_iterators = {
          "entity1": ("entity one" for _ in range(1)),
          "entity2": ("entity two" for _ in range(1)),
      }
  
      # When
      utterance = generate_utterance(
          context_iterator, entities_iterators
      )
  
      # Then
      expected_utterance = {
          "data": [
              {
                  "text": "this is ",
              },
              {
                  "text": "entity one ",
                  "entity": "entity1",
                  "slot_name": "slot1",
              },
              {"text": "right "},
              {
                  "text": "entity two ",
                  "entity": "entity2",
                  "slot_name": "slot1",
              },
          ]
      }
      self.assertEqual(expected_utterance, utterance)
  
file_path: snips-nlu/snips_nlu/tests/test_data_augmentation.py
imports: from __future__ import unicode_literals
  from builtins import next, range
  import numpy
  from mock import patch
  from snips_nlu.constants import LANGUAGE_EN, STOP_WORDS
  from snips_nlu.data_augmentation import capitalize, capitalize_utterances, generate_utterance, get_contexts_iterator, get_entities_iterators
  from snips_nlu.tests.utils import SnipsTest
label_desc: Use image node_id 4 for calling the TestDataAugmentation obj's underlying member method code with example usage: obj.test_generate_utterance() without return types