code: def read_text(fpath, sep=None, encoding="utf-8", errors=None):
      """Read text file and return two lists of text documents and corresponding ids.
      If `sep` is None, only return one list containing elements are lines of text
      in the original file.
  
      Parameters
      ----------
      fpath: str
          Path to the data file
  
      sep: str, default = None
          The delimiter string used to split `id` and `text`. Each line is assumed
          containing an `id` followed by corresponding `text` document.
          If `None`, each line will be a `str` in returned list.
  
      encoding: str, default = `utf-8`
          Encoding used to decode the file.
  
      errors: int, default = None
          Optional string that specifies how encoding errors are to be handled.
          Pass 'strict' to raise a ValueError exception if there is an encoding error
          (None has the same effect), or pass 'ignore' to ignore errors.
  
      Returns
      -------
      texts, ids (optional): list, list
          Return list of text strings with corresponding indices (if `sep` is not None).
      """
      with open(fpath, encoding=encoding, errors=errors) as f:
          if sep is None:
              return [line.strip() for line in f]
          else:
              texts, ids = [], []
              for line in f:
                  tokens = line.strip().split(sep)
                  ids.append(tokens[0])
                  texts.append(sep.join(tokens[1:]))
              return texts, ids
  
imports: import ast
  import itertools
  from collections import Counter
label_desc: Use image node_id 13 for calling a global function with example usage: read_text(fpath, sep, encoding, errors) and returns: unknown, texts,  ids