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.
"dog." and "dog" are different words.{}.Once your code passes every test, a reference solution shows up here so you can compare it with yours.