def METHOD_NAME(self, data_loader, N):
    # check that data_loader produces range(N)
    data = list(iter(data_loader))
    data = [x for batch in data for x in batch]  # flatten the batches
    self.assertEqual(len(data), N)
    self.assertEqual(set(data), set(range(N)))