docs: def read_separated_lines_generator(path, separator=' ', max_columns=-1,
                                     ignore_lines_starting_with=[], keep_empty=False):
      """
      Creates a generator through all lines of a file and returns the splitted line.
  
      Parameters:
          path: Path to the file.
          separator: Separator that is used to split the columns.
          max_columns: Number of max columns (if the separator occurs within the last column).
          ignore_lines_starting_with: Lines starting with a string in this list will be ignored.
          keep_empty (bool): If True empty columns are returned as well.
      """
      if not os.path.isfile(path):
          print('File doesnt exist or is no file: {}'.format(path))
          return
  
      f = open(path, 'r', errors='ignore', encoding='utf-8')
  
      if max_columns > -1:
          max_splits = max_columns - 1
      else:
          max_splits = -1
  
      for line in f:
          if keep_empty:
              stripped_line = line
          else:
              stripped_line = line.strip()
  
          should_ignore = text.starts_with_prefix_in_list(stripped_line, ignore_lines_starting_with)
  
          if not should_ignore and stripped_line != '':
              record = stripped_line.split(sep=separator, maxsplit=max_splits)
              record = [field.strip() for field in record]
              yield record
  
      f.close()