Write a Python function to take a list of words and return a dictionary of word counts.
def word_counts(words):
    counts = {}
    for word in words:
        if word in counts:
            counts[word] += 1
        else:
            counts[word] = 1
    return counts