class_docstr: Writes Core training data into a file in a YAML format.
docstr: Writes Story steps into a target file/stream.
  
  Args:
      target: name of the target file/stream to write the YAML to.
      story_steps: Original story steps to be converted to the YAML.
      is_appendable: Specify if result should not contain
                     high level keys/definitions and can be appended to
                     the existing story file.
      is_test_story: Identifies if the stories should be exported in test stories
                     format.
docstr_tok: ["Writes","Story","steps","into","a","target","file\/stream",".","Args",":","target",":","name","of","the","target","file\/stream","to","write","the","YAML","to",".","story_steps",":","Original","story","steps","to","be","converted","to","the","YAML",".","is_appendable",":","Specify","if","result","should","not","contain","high","level","keys\/definitions","and","can","be","appended","to","the","existing","story","file",".","is_test_story",":","Identifies","if","the","stories","should","be","exported","in","test","stories","format","."]
code: def dump(
      self,
      target: Union[Text, Path, yaml.StringIO],
      story_steps: List[StoryStep],
      is_appendable: bool = False,
      is_test_story: bool = False,
  ) -> None:
      """Writes Story steps into a target file/stream.
  
      Args:
          target: name of the target file/stream to write the YAML to.
          story_steps: Original story steps to be converted to the YAML.
          is_appendable: Specify if result should not contain
                         high level keys/definitions and can be appended to
                         the existing story file.
          is_test_story: Identifies if the stories should be exported in test stories
                         format.
      """
      result = self.stories_to_yaml(story_steps, is_test_story)
      if is_appendable and KEY_STORIES in result:
          result = result[KEY_STORIES]
      rasa.shared.utils.io.write_yaml(result, target, True)
  
imports: from collections import OrderedDict
  from pathlib import Path
  from typing import Any, Dict, List, Text, Union, Optional
  from ruamel import yaml
  from ruamel.yaml.comments import CommentedMap
  from ruamel.yaml.scalarstring import DoubleQuotedScalarString, LiteralScalarString
  import rasa.shared.utils.io
  import rasa.shared.core.constants
  from rasa.shared.constants import LATEST_TRAINING_DATA_FORMAT_VERSION
  import rasa.shared.core.events
  from rasa.shared.core.events import UserUttered, ActionExecuted, SlotSet, ActiveLoop, Event
  from rasa.shared.core.training_data.story_reader.yaml_story_reader import KEY_STORIES, KEY_STORY_NAME, KEY_USER_INTENT, KEY_ENTITIES, KEY_ACTION, KEY_STEPS, KEY_CHECKPOINT, KEY_SLOT_NAME, KEY_CHECKPOINT_SLOTS, KEY_OR, KEY_USER_MESSAGE, KEY_ACTIVE_LOOP, KEY_BOT_END_TO_END_MESSAGE, KEY_RULES, KEY_RULE_FOR_CONVERSATION_START, KEY_WAIT_FOR_USER_INPUT_AFTER_RULE, KEY_RULE_CONDITION, KEY_RULE_NAME
  from rasa.shared.core.training_data.story_writer.story_writer import StoryWriter
  from rasa.shared.core.training_data.structures import StoryStep, Checkpoint, STORY_START, RuleStep
label_desc: Use image node_id 2 for calling the YAMLStoryWriter obj's underlying member method code with example usage: obj.dump(target, story_steps, is_appendable, is_test_story) without return types