class_docstr: A class for writing training data to a file.
docstr: Writes a TrainingData object to a file.
docstr_tok: ["Writes","a","TrainingData","object","to","a","file","."]
code: def dump(self, filename: Text, training_data: "TrainingData") -> None:
      """Writes a TrainingData object to a file."""
      s = self.dumps(training_data)
      rasa.shared.utils.io.write_text_file(s, filename)
  
imports: import abc
  import json
  from collections import OrderedDict
  from pathlib import Path
  import rasa.shared.nlu.training_data.util
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.nlu.constants import INTENT, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTRIBUTE_START, ENTITY_ATTRIBUTE_END, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE
  import rasa.shared.utils.io
  import typing
  from typing import Text, Dict, Any, Union, List
  from collections import defaultdict
label_desc: Use image node_id 1 for calling the TrainingDataWriter obj's underlying member method code with example usage: obj.dump(filename, training_data) without return types