code: def read_sentences_from_file(
      path_to_file, one_sentence_per_line=True
  ):
      lines = []
      with io.open(path_to_file, mode="r", encoding="utf-8") as file:
          for line in file:
              line = line.strip()
              if line != "":
                  lines.append(line.strip())
  
      if one_sentence_per_line:
          sentences = lines
      else:
          text = " ".join(lines)
          sentences = list(split_multi(text))
          sentences = [
              sentence for sentence in sentences if sentence != ""
          ]
  
      return sentences
  
file_path: BLINK/blink/utils.py
imports: import io
  import json
  import os
  import pickle
  from segtok.segmenter import split_multi
label_desc: Use image node_id 1 for calling a global function with example usage: read_sentences_from_file(path_to_file, one_sentence_per_line) and returns: sentences