code: def add(self, word, id=None):
          
          word_id = id if id is not None else self.get_next_id()
          self[word] = word_id
          self.id2word[word_id] = word
docs: Adds a new word to the WordList and assigns it an id.  If id is set,
          :param word: The word token
          :param id: (Optional) The token id can be set, but bypasses the automatic id assignment.  Only specify the id
            if you plan to specify it on all add calls.
          :return: None