class_docstr: Queue with Binary Indexed Tree cache
  
  queue-like data structure
  append, update are O(log n)
  reduction over an interval is O(log n) per query
class_docstr_tok: ["Queue","with","Binary","Indexed","Tree","cache","queue-like","data","structure","append",",","update","are","O","(","log","n",")","reduction","over","an","interval","is","O","(","log","n",")","per","query"]
code: def __init__(self, op: Aggregator):
      self.length = 0
      self.op = op
  
imports: import collections
  from typing import Any, Callable, Deque, Generic, List, Optional, Sequence, Tuple, TypeVar
  import numpy
  from pfrl.utils.random import sample_n_k
label_desc: Use image node_id 1 to create a new TreeQueue object from inherited base classes: Generic with example: obj = TreeQueue(op)