code: def summarize(objects):
      
      count = {}
      total_size = {}
      for o in objects:
          otype = _repr(o)
          if otype in count:
              count[otype] += 1
              total_size[otype] += _getsizeof(o)
          else:
              count[otype] = 1
              total_size[otype] = _getsizeof(o)
      rows = []
      for otype in count:
          rows.append([otype, count[otype], total_size[otype]])
      return rows
docs: Summarize an objects list.
  
      Return a list of lists, whereas each row consists of::
        [str(type), number of objects of this type, total size of these objects].
  
      No guarantee regarding the order is given.