code: def test_entities_iterators_with_builtin_examples(
      self, _, mocked_builtin_entity_examples
  ):
      # Given
      language = "en"
  
      def mock_builtin_entity_examples(builtin_entity_kind, _):
          if builtin_entity_kind == "snips/number":
              return ["2007", "two hundreds and six"]
          return []
  
      mocked_builtin_entity_examples.side_effect = (
          mock_builtin_entity_examples
      )
  
      intent_entities = {
          "entity1": {
              "utterances": {
                  "entity 1": "entity 1",
                  "entity 11": "entity 11",
                  "entity 111": "entity 111",
              }
          },
          "snips/number": {"utterances": {"9", "seventy"}},
      }
      random_state = np.random.RandomState(1)
  
      # Then
      add_builtin_entities_examples = True
      it_dict = get_entities_iterators(
          intent_entities,
          language,
          add_builtin_entities_examples,
          random_state,
      )
  
      # When
      self.assertIn("entity1", it_dict)
      expected_seq = ["entity 1", "entity 11", "entity 111"]
      seq = [next(it_dict["entity1"]) for _ in range(len(expected_seq))]
      self.assertListEqual(expected_seq, sorted(seq))
  
      self.assertIn("snips/number", it_dict)
      # Check that entity examples are at the beginning of the iterator
      expected_seq_start = ["2007", "two hundreds and six"]
      seq_start = [next(it_dict["snips/number"]) for _ in range(2)]
      self.assertListEqual(expected_seq_start, seq_start)
  
      expected_seq_end = ["9", "seventy"]
      seq_end = [next(it_dict["snips/number"]) for _ in range(2)]
      self.assertListEqual(expected_seq_end, sorted(seq_end))
  
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 3 for calling the TestDataAugmentation obj's underlying member method code with example usage: obj.test_entities_iterators_with_builtin_examples(_, mocked_builtin_entity_examples) and returns: list, list