class_docstr: A dialogue comprises a list of Turn objects.
docstr: This function returns the dialogue as a dictionary to assist in
  serialization.
docstr_tok: ["This","function","returns","the","dialogue","as","a","dictionary","to","assist","in","serialization","."]
code: def as_dict(self) -> Dict:
      """This function returns the dialogue as a dictionary to assist in
      serialization.
      """
      return {
          "events": [event.as_dict() for event in self.events],
          "name": self.name,
      }
  
imports: from typing import Dict, List, Text, Any, TYPE_CHECKING
  import rasa.shared.core.events
label_desc: Use image node_id 3 for calling the Dialogue obj's underlying member method code with example usage: obj.as_dict() and returns: dict