class_docstr: A tree which can be used as a min/max heap or a sum tree
  Add or update item value - O(log N)
  Sampling an item - O(log N)
code: def __str__(self):
      result = ""
      start = 0
      size = 1
      while size <= self.size:
          result += "{}\n".format(self.tree[start : (start + size)])
          start += size
          size *= 2
      return result
  
imports: import operator
  import random
  from enum import Enum
  from typing import List, Tuple, Any
  import numpy
  from rl_coach.core_types import Transition
  from rl_coach.memories.memory import MemoryGranularity
  from rl_coach.memories.non_episodic.experience_replay import ExperienceReplayParameters, ExperienceReplay
  from rl_coach.schedules import Schedule, ConstantSchedule
label_desc: Use image node_id 8 for calling the SegmentTree obj's underlying member method code with example usage: obj.__str__() and returns: result