<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tf(cluster):
 """ Computes the term frequency and stores it as a dictionary :param cluster: the cluster that contains the metadata :return: tf dictionary """

        counts = dict()
        words = cluster.split(' ')
        for word in words:
            counts[word] = counts.get(word, 0) + 1
        return counts