def configObsIDsForEachBatch(self):
    ''' Assign each observation in dataset to a batch by random permutation

        Returns
        --------
        obsIDByBatch : list of length self.nBatch,
                       where obsIDByBatch[bID] : list of all obsIDs in batch bID 
    '''
    PRNG = np.random.RandomState(self.dataorderseed)
    #Note that we're using nDocTotal to permute document ids
    obsIDs = PRNG.permutation(self.Data.nDocTotal).tolist()
    obsIDByBatch = dict()
    for batchID in range(self.nBatch-1):
      obsIDByBatch[batchID] = obsIDs[:self.nObsBatch]
      del obsIDs[:self.nObsBatch]
    obsIDByBatch[self.nBatch-1] = obsIDs # Last batch may be slightly bigger
    return obsIDByBatch
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/data/AdmixMinibatchIterator.py/AdmixMinibatchIterator.configObsIDsForEachBatch/original