def __iter__(self):
        self.batch_index = 0
        shuf_idx = self.be.rng.permutation(len(self.story))
        self.story = self.story[shuf_idx]
        self.query = self.query[shuf_idx]
        self.answer = self.answer[shuf_idx]

        while self.batch_index < self.nbatches:
            batch = slice(self.batch_index*self.be.bsz, (self.batch_index+1)*self.be.bsz)
            story_tensor = self.be.array(self.story[batch].T.copy())
            query_tensor = self.be.array(self.query[batch].T.copy())
            answer_tensor = self.be.array(self.answer[batch].T.copy())

            self.batch_index += 1

            yield (story_tensor, query_tensor), answer_tensor
Test permission cache clearing on page save
dataset/ETHPy150Open NervanaSystems/neon/neon/data/questionanswer.py/QA.__iter__--crossover with--dataset/ETHPy150Open divio/django-cms/cms/tests/test_permissions.py/PermissionCacheTests.test_cache_invalidation