

def get_next_batch(self):
    ' Returns DataObj of the next batch\n    Since this is a DB thing, we should connect to the DB and return appropriate documents\n    '
    if (not self.has_next_batch()):
        raise StopIteration()
    self.curLapPos += 1
    if (self.curLapPos >= self.nBatch):
        self.curLapPos = 0
        self.lapID += 1
    self.batchOrderCurLap = self.get_rand_order_for_batchIDs_current_lap()
    query.batchID = self.batchOrderCurLap[self.curLapPos]
    obsIDsCurBatch = self.obsIDByBatch[self.batchID]
    query = (('select * from data where rowid in (' + ','.join(map(str, obsIDsCurBatch))) + ')')
    bData = WordsData.read_from_db(self.dbpath, query, nDoc=len(obsIDsCurBatch), nDocTotal=self.nDocTotal, vocab_size=self.vocab_size)
    return bData

dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/data/AdmixMinibatchIteratorDB.py AdmixMinibatchIteratorDB.get_next_batch/VarMisuse@72/159 `self`->`query`