class_docstr: A sum tree data structure for storing replay priorities.
  A sum tree is a complete binary tree whose leaves contain values called
  priorities. Internal nodes maintain the sum of the priorities of all leaf
  nodes in their subtree.
  For capacity = 4, the tree may look like this:
               +---+
               |2.5|
               +-+-+
                 |
         +-------+--------+
         |                |
       +-+-+            +-+-+
       |1.5|            |1.0|
       +-+-+            +-+-+
         |                |
    +----+----+      +----+----+
    |         |      |         |
  +-+-+     +-+-+  +-+-+     +-+-+
  |0.5|     |1.0|  |0.5|     |0.5|
  +---+     +---+  +---+     +---+
  This is stored in a list of numpy arrays:
  self.nodes = [ [2.5], [1.5, 1], [0.5, 1, 0.5, 0.5] ]
  For conciseness, we allocate arrays as powers of two, and pad the excess
  elements with zero values.
  This is similar to the usual array-based representation of a complete binary
  tree, but is a little more user-friendly.
class_docstr_tok: ["A","sum","tree","data","structure","for","storing","replay","priorities",".","A","sum","tree","is","a","complete","binary","tree","whose","leaves","contain","values","called","priorities",".","Internal","nodes","maintain","the","sum","of","the","priorities","of","all","leaf","nodes","in","their","subtree",".","For","capacity","=","4",",","the","tree","may","look","like","this",":","+","--","-+","|2.5|","+-+-+","|","+","--","--","--","-+","--","--","--","--","+","|","|","+-+-+","+-+-+","|1.5|","|1.0|","+-+-+","+-+-+","|","|","+","--","--","+","--","--","+","+","--","--","+","--","--","+","|","|","|","|","+-+-+","+-+-+","+-+-+","+-+-+","|0.5|","|1.0|","|0.5|","|0.5|","+","--","-+","+","--","-+","+","--","-+","+","--","-+","This","is","stored","in","a","list","of","numpy","arrays",":","self.nodes","=","[","[","2.5","]",",","[","1.5",",","1","]",",","[","0.5",",","1",",","0.5",",","0.5","]","]","For","conciseness",",","we","allocate","arrays","as","powers","of","two",",","and","pad","the","excess","elements","with","zero","values",".","This","is","similar","to","the","usual","array-based","representation","of","a","complete","binary","tree",",","but","is","a","little","more","user-friendly","."]
docstr: Returns the sum of all priorities stored in this sum tree.
  Returns:
    float, sum of priorities stored in this sum tree.
docstr_tok: ["Returns","the","sum","of","all","priorities","stored","in","this","sum","tree",".","Returns",":","float",",","sum","of","priorities","stored","in","this","sum","tree","."]
code: def _total_priority(self) -> float:
      """Returns the sum of all priorities stored in this sum tree.
      Returns:
        float, sum of priorities stored in this sum tree.
      """
      return self.nodes[0][0]
  
file_path: ReAgent/reagent/replay_memory/sum_tree.py
imports: import math
  import random
  from typing import List, Optional
  import numpy
label_desc: Use image node_id 2 for calling the SumTree obj's underlying member method code with example usage: obj._total_priority() and returns: self