code: def retokenize_document(lines):
      processed_lines = []
      sentence = []
      for line in lines:
          line = line.strip()
          if not line:
              if sentence:
                  processed_lines.append(sentence)
                  sentence = []
          else:
              pieces = line.split("\t")
              if pieces[0] == "_":
                  sentence.append(" ")
              else:
                  sentence.append(pieces[0])
      if sentence:
          processed_lines.append(sentence)
  
      processed_lines = reprocess_lines(processed_lines)
      paragraphs = convert_processed_lines(processed_lines)
      return paragraphs
  
file_path: stanza/stanza/utils/datasets/tokenization/convert_th_lst20.py
imports: import argparse
  import glob
  import os
  import sys
  from stanza.utils.datasets.tokenization.process_thai_tokenization import write_section, convert_processed_lines, reprocess_lines
label_desc: Use image node_id 2 for calling a global function with example usage: retokenize_document(lines) and returns: paragraphs