class_docstr: Holds loaded intent and entity training data.
class_docstr_tok: ["Holds","loaded","intent","and","entity","training","data","."]
docstr: Set response phrase for all examples by looking up NLG stories.
docstr_tok: ["Set","response","phrase","for","all","examples","by","looking","up","NLG","stories","."]
code: def _fill_response_phrases(self) -> None:
      """Set response phrase for all examples by looking up NLG stories."""
      for example in self.training_examples:
          # if intent_response_key is None, that means the corresponding intent is
          # not a retrieval intent and hence no response text needs to be fetched.
          # If intent_response_key is set, fetch the corresponding response text
          if example.get(INTENT_RESPONSE_KEY) is None:
              continue
  
          # look for corresponding bot utterance
          story_lookup_key = util.intent_response_key_to_template_key(
              example.get_full_intent()
          )
          assistant_utterances = self.responses.get(
              story_lookup_key, []
          )
          if assistant_utterances:
              # Use the first response text as training label if needed downstream
              for assistant_utterance in assistant_utterances:
                  if assistant_utterance.get(TEXT):
                      example.set(RESPONSE, assistant_utterance[TEXT])
  
              # If no text attribute was found use the key for training
              if not example.get(RESPONSE):
                  example.set(RESPONSE, story_lookup_key)
  
imports: import logging
  import os
  from pathlib import Path
  import random
  from collections import Counter, OrderedDict
  import copy
  from os.path import relpath
  from typing import Any, Dict, List, Optional, Set, Text, Tuple, Callable
  import operator
  import rasa.shared.data
  from rasa.shared.utils.common import lazy_property
  import rasa.shared.utils.io
  from rasa.shared.nlu.constants import RESPONSE, INTENT_RESPONSE_KEY, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE, NO_ENTITY_TAG, INTENT, ENTITIES, TEXT, ACTION_NAME
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.training_data import util
label_desc: Use image node_id 24 for calling the TrainingData obj's underlying member method code with example usage: obj._fill_response_phrases() without return types