docs: def template_to_text(tmpl, debug=0):
      """
      convert parse tree template to text
      """
      tarr = []
      for item in tmpl.itertext():
          tarr.append(item)
  
      text = "{{%s}}" % "|".join(tarr).strip()
  
      if debug > 1:
          print("+ template_to_text:")
          print("  %s" % text)
  
      return text