Before training a text model, you often count how many times each word appears.
Task: write word_counts(text) that returns a dictionary mapping each word to how many times it appears.
word_counts(text)
"dog."
"dog"
{}
1def word_counts(text):2 # your code here3 pass4