code: def add_unknown_word_to_utterances(
      utterances,
      replacement_string,
      unknown_word_prob,
      max_unknown_words,
      random_state,
  ):
      if not max_unknown_words:
          return utterances
  
      new_utterances = deepcopy(utterances)
      for u in new_utterances:
          if random_state.rand() < unknown_word_prob:
              num_unknown = random_state.randint(
                  1, max_unknown_words + 1
              )
              # We choose to put the noise at the end of the sentence and not
              # in the middle so that it doesn't impact to much ngrams
              # computation
              extra_chunk = {
                  TEXT: " "
                  + " ".join(
                      replacement_string for _ in range(num_unknown)
                  )
              }
              u[DATA].append(extra_chunk)
      return new_utterances
  
imports: from __future__ import division, unicode_literals
  import itertools
  import re
  from builtins import next, range, str
  from copy import deepcopy
  from uuid import uuid4
  from future.utils import iteritems, itervalues
  from snips_nlu.constants import DATA, ENTITY, INTENTS, TEXT, UNKNOWNWORD, UTTERANCES
  from snips_nlu.data_augmentation import augment_utterances
  from snips_nlu.dataset import get_text_from_chunks
  from snips_nlu.entity_parser.builtin_entity_parser import is_builtin_entity
  from snips_nlu.preprocessing import tokenize_light
  from snips_nlu.resources import get_noise
label_desc: Use image node_id 6 for calling a global function with example usage: add_unknown_word_to_utterances(utterances, replacement_string, unknown_word_prob, max_unknown_words, random_state) and returns: new_utterances, utterances