0: def word_count(tokenized_documents): # list of lists of tokens
1: word_counts = {}
2: thread_pool = ThreadPool()
3: i = 0
4: for thread in thread_pool
5: run thread:
6: while i < len(tokenized_documents):
7: doc = tokenized_documents[i]
8: i += 1
9: for token in doc:
10: old_count = word_counts.get(token, 0)
11: word_counts[token] =