code: def print_summary(self):
          
          # Emit class summaries for each snapshot
          classlist = self.tracked_classes
  
          fobj = self.stream
  
          fobj.write('---- SUMMARY '+'-'*66+'\n')
          for snapshot in self.snapshots:
              self.annotate_snapshot(snapshot)
              fobj.write('%-35s %11s %12s %12s %5s\n' % (
                  trunc(snapshot.desc, 35),
                  'active',
                  pp(snapshot.asizeof_total),
                  'average',
                  'pct'
              ))
              for classname in classlist:
                  info = snapshot.classes.get(classname)
                  fobj.write('  %-33s %11d %12s %12s %4d%%\n' % (
                      trunc(classname, 33),
                      info['active'],
                      pp(info['sum']),
                      pp(info['avg']),
                      info['pct']
                  ))
          fobj.write('-'*79+'\n')
docs: Print per-class summary for each snapshot.