code: def read_file(path, tok=False):
      """a generator to generate each line of file."""
      with open_file(path) as f:
          for line in f.readlines():
              words = split_sentence(line.strip(), tok)
              yield words
  
file_path: texar/examples/transformer/utils/preprocess.py
imports: import collections
  import re
  import json
  import os
  import numpy
  import pickle
  import argparse
  from io import open
label_desc: Use image node_id 3 for calling a global function with example usage: read_file(path, tok) without return types