code: def test_min_tree():
      min_tree = SegmentTree(
          size=4, operation=SegmentTree.Operation.MIN
      )
      min_tree.add(10, "10")
      assert min_tree.total_value() == 10
      min_tree.add(20, "20")
      assert min_tree.total_value() == 10
      min_tree.add(5, "5")
      assert min_tree.total_value() == 5
      min_tree.add(7.5, "7.5")
      assert min_tree.total_value() == 5
      min_tree.add(2, "2")
      assert min_tree.total_value() == 2
      min_tree.add(3, "3")
      min_tree.add(3, "3")
      min_tree.add(3, "3")
      min_tree.add(5, "5")
      assert min_tree.total_value() == 3
  
imports: import os
  import sys
  import pytest
  from rl_coach.memories.non_episodic.prioritized_experience_replay import SegmentTree
label_desc: Use image node_id 2 for calling a global function with example usage: test_min_tree() without return types