def METHOD_NAME(self, data, classes, x_sizes):
    summarizer = ClassSummarizer(stats=CommonStats())
    for x, y in data:
        summarizer.update(x, y)
    summ = summarizer.summary
    self.assertIsNotNone(summ)
    self.assertIsInstance(summ, list)
    for s, size in zip(summ, x_sizes):
        self.assertIsInstance(s, dict)
        for key in s:
            self.assertEqual(s[key].size(), size)
    self.assertIsNotNone(summarizer.class_summaries)
    all_classes = torch.zeros(len(classes))
    class_summaries = summarizer.class_summaries
    all_keys = set(class_summaries.keys())
    for i, clazz in enumerate(classes):
        self.assertTrue(clazz in class_summaries)
        all_keys.remove(clazz)
        all_classes[i] = 1
        summ = class_summaries[clazz]
        self.assertIsNotNone(summ)
        self.assertIsInstance(summ, list)
        for s, size in zip(summ, x_sizes):
            self.assertIsInstance(s, dict)
            for key in s:
                self.assertEqual(s[key].size(), size)
    self.assertEqual(len(all_keys), 0)
    self.assertEqual(all_classes.sum(), len(classes))