class_docstr: Fast weighted sampling.
  
  list-like data structure
  append, update are O(log n)
  summation over an interval is O(log n) per query
class_docstr_tok: ["Fast","weighted","sampling",".","list-like","data","structure","append",",","update","are","O","(","log","n",")","summation","over","an","interval","is","O","(","log","n",")","per","query"]
code: def _pick(self, cum):
      if self._isleaf():
          return self.bd[0], self.s
      else:
          if cum < self.left.s:
              return self.left._pick(cum)
          else:
              return self.right._pick(cum - self.left.s)
  
imports: import collections
  import numpy
  from chainerrl.misc.random import sample_n_k
label_desc: Use image node_id 15 for calling the SumTree obj's underlying member method code with example usage: obj._pick(cum) and returns: self,  self, self, self