def _get_batches(self, items):
        """given a list yield list at most self.max_batch_size in size"""
        for i in xrange(0, len(items), self.max_batch_size):
            yield items[i:i + self.max_batch_size]
given a list yield list at most self.max_batch_size in size