class_docstr: Holds loaded intent and entity training data.
class_docstr_tok: ["Holds","loaded","intent","and","entity","training","data","."]
docstr: Returns the full filename to persist NLG data.
docstr_tok: ["Returns","the","full","filename","to","persist","NLG","data","."]
code: def get_nlg_persist_filename(nlu_filename: Text) -> Text:
      """Returns the full filename to persist NLG data."""
      extension = Path(nlu_filename).suffix
      if rasa.shared.data.is_likely_json_file(nlu_filename):
          # backwards compatibility: previously NLG was always dumped as md. now
          # we are going to dump in the same format as the NLU data. unfortunately
          # there is a special case: NLU is in json format, in this case we use
          # YAML as we do not have a NLG json format
          extension = rasa.shared.data.yaml_file_extension()
      # Add nlg_ as prefix and change extension to the correct one
      filename = (
          Path(nlu_filename)
          .with_name("nlg_" + Path(nlu_filename).name)
          .with_suffix(extension)
      )
      return str(filename)
  
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 30 for calling the TrainingData obj's underlying member method code with example usage: obj.get_nlg_persist_filename(nlu_filename) and returns: str