def calc_doc_word_stats(word_counts):
    """Return number of unique words and word frequencies, as in Using Python 
    for Research lecture code from Case Study on Langauge Processing."""
    num_unique = len(word_counts)
    counts = word_counts.values()
    return (num_unique, counts)