<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune_clusters(clusters, index, n=3):
 """ Delete clusters with fewer than n elements. """

    torem = set(c for c in clusters if c.size < n)
    pruned_clusters = [c for c in clusters if c.size >= n]
    terms_torem = []
    for term, clusters in index.items():
        index[term] = clusters - torem
        if len(index[term]) == 0:
            terms_torem.append(term)
    for t in terms_torem:
        del index[t]
    return pruned_clusters, index