class_docstr: A data structure to represent a parse tree
class_docstr_tok: ["A","data","structure","to","represent","a","parse","tree"]
code: def write_treebank(trees, out_file, fmt="{}"):
      with open(out_file, "w", encoding="utf-8") as fout:
          for tree in trees:
              fout.write(fmt.format(tree))
              fout.write("\n")
  
imports: from collections import deque, Counter
  from enum import Enum
  from io import StringIO
  import itertools
  import re
  import warnings
  from stanza.models.common.stanza_object import StanzaObject
label_desc: Use image node_id 29 for calling the Tree obj's underlying member method code with example usage: obj.write_treebank(trees, out_file, fmt) without return types