code: def _get_words(data_dir):
      
      words_file = data_dir.joinpath("words.txt")
      word_list = []
      if not words_file.is_file():
          return word_list
      with open(words_file, mode="r") as f:
          for l in f:
              line = l.rstrip()
              word_list.append(line)
      return word_list
docs: Get list of words from history file.
  
      Parameters
      ----------
      data_dir : pathlib.Path
          Directory where data is saved.
  
      Returns
      -------
      word_list : list of str
          List of words.