code: def get_entities_iterators(
      intent_entities,
      language,
      add_builtin_entities_examples,
      random_state,
  ):
      from snips_nlu_parsers import get_builtin_entity_examples
  
      entities_its = dict()
      for entity_name, entity in iteritems(intent_entities):
          utterance_values = random_state.permutation(
              sorted(entity[UTTERANCES])
          )
          if add_builtin_entities_examples and is_builtin_entity(
              entity_name
          ):
              entity_examples = get_builtin_entity_examples(
                  entity_name, language
              )
              # Builtin entity examples must be kept first in the iterator to
              # ensure that they are used when augmenting data
              iterator_values = entity_examples + list(utterance_values)
          else:
              iterator_values = utterance_values
          entities_its[entity_name] = cycle(iterator_values)
      return entities_its
  
file_path: snips-nlu/snips_nlu/data_augmentation.py
imports: from __future__ import unicode_literals
  from builtins import next
  from copy import deepcopy
  from itertools import cycle
  from future.utils import iteritems
  from snips_nlu.constants import CAPITALIZE, DATA, ENTITIES, ENTITY, INTENTS, TEXT, UTTERANCES
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.languages import get_default_sep
  from snips_nlu.preprocessing import tokenize_light
  from snips_nlu.resources import get_stop_words
label_desc: Use image node_id 5 for calling a global function with example usage: get_entities_iterators(intent_entities, language, add_builtin_entities_examples, random_state) and returns: entities_its