code: def augment_utterances(
      dataset,
      intent_name,
      language,
      min_utterances,
      capitalization_ratio,
      add_builtin_entities_examples,
      resources,
      random_state,
  ):
      contexts_it = get_contexts_iterator(
          dataset, intent_name, random_state
      )
      intent_entities = {
          e: dataset[ENTITIES][e]
          for e in get_intent_entities(dataset, intent_name)
      }
      entities_its = get_entities_iterators(
          intent_entities,
          language,
          add_builtin_entities_examples,
          random_state,
      )
      generated_utterances = []
      nb_to_generate = num_queries_to_generate(
          dataset, intent_name, min_utterances
      )
      while nb_to_generate > 0:
          generated_utterance = generate_utterance(
              contexts_it, entities_its
          )
          generated_utterances.append(generated_utterance)
          nb_to_generate -= 1
  
      generated_utterances = capitalize_utterances(
          generated_utterances,
          dataset[ENTITIES],
          language,
          ratio=capitalization_ratio,
          resources=resources,
          random_state=random_state,
      )
  
      return generated_utterances
  
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 8 for calling a global function with example usage: augment_utterances(dataset, intent_name, language, min_utterances, capitalization_ratio, add_builtin_entities_examples, resources, random_state) and returns: generated_utterances