code: def PrintErrorCounts(self):
      
      for category, count in self.errors_by_category.iteritems():
        sys.stderr.write('Category \'%s\' errors found: %d\n' %
                         (category, count))
      sys.stderr.write('Total errors found: %d\n' % self.error_count)
docs: Print a summary of errors by category, and the total.