def sample_batch_prioritized(self, batch_size, history):
p_total = self.segment_tree.total()<EOL>segment = p_total / batch_size<EOL>batch = [self._get_sample_from_segment(segment, i, history) for i in range(batch_size)]<EOL>probs, idxs, tree_idxs = zip(*batch)<EOL>return probs, np.array(idxs), tree_idxs<EOL>
Return indexes of the next sample in from prioritized distribution