code: def term_counts(self):
  
          
  
          counts = OrderedDict()
          for term in self.terms:
              counts[term] = len(self.terms[term])
  
          return utils.sort_dict(counts)
docs: Returns:
              OrderedDict: An ordered dictionary of term counts.