code: def most_frequent(self, k):
      
      word_count = {w:self.word_count[w] for w in self.words[:k]}
      return CountedVocabulary(word_count=word_count)
docs: Returns a vocabulary with the most frequent `k` words.
  
      Args:
        k (integer): specifies the top k most frequent words to be returned.