code: def transform_raw_sst(data_path, raw_fn, new_fn):
      """Transforms the raw data format to a new format."""
      fout_x_name = os.path.join(data_path, new_fn + ".sentences.txt")
      fout_x = open(fout_x_name, "w", encoding="utf-8")
      fout_y_name = os.path.join(data_path, new_fn + ".labels.txt")
      fout_y = open(fout_y_name, "w", encoding="utf-8")
  
      fin_name = os.path.join(data_path, raw_fn)
      with open(fin_name, "r", encoding="utf-8") as fin:
          for line in fin:
              parts = line.strip().split()
              label = parts[0]
              sent = " ".join(parts[1:])
              sent = clean_sst_text(sent)
              fout_x.write(sent + "\n")
              fout_y.write(label + "\n")
  
      return fout_x_name, fout_y_name
  
file_path: texar/examples/sentence_classifier/sst_data_preprocessor.py
imports: import os
  import re
  from io import open
  import tensorflow
  import texar.tf
label_desc: Use image node_id 2 for calling a global function with example usage: transform_raw_sst(data_path, raw_fn, new_fn) and returns: fout_x_name,  fout_y_name