code: def write_sentence(fout, words, spaces):
      """
      Write a sentence based on the list of words.
  
      spaces is a fraction of the words which should randomly have spaces
      If 0.0, none of the words will have spaces
      This is because the Myanmar language doesn't require spaces, but
        spaces always separate words
      """
      full_text = "".join(words)
      fout.write("# text = %s\n" % full_text)
  
      for word_idx, word in enumerate(words):
          fake_dep = "root" if word_idx == 0 else "dep"
          fout.write("%d\t%s\t%s" % ((word_idx + 1), word, word))
          fout.write("\t_\t_\t_")
          fout.write("\t%d\t%s" % (word_idx, fake_dep))
          fout.write("\t_\t")
          if random.random() > spaces:
              fout.write("SpaceAfter=No")
          else:
              fout.write("_")
          fout.write("\n")
      fout.write("\n")
  
file_path: stanza/stanza/utils/datasets/tokenization/convert_my_alt.py
imports: import os
  import random
  from stanza.models.constituency.tree_reader import read_trees
label_desc: Use image node_id 4 for calling a global function with example usage: write_sentence(fout, words, spaces) without return types