def next(self, peek=False):
        if not self.batch_iter:
            self.batch_iter = self.get_homogenous_batch_iter()
        if not self.batch_iter:
            raise StopIteration
        try:
            batch = next(self.batch_iter)
        except __HOLE__:
            self.batch_iter = None
            raise StopIteration

        return batch[0], batch[1]
dataset/ETHPy150Open arctic-nmt/nmt/nmt/homogeneous_data.py/HomogenousData.next