code: def test_prefixsum_idx2():
      """
      test Segment Tree data structure
      """
      tree = SumSegmentTree(4)
  
      tree[np.array([0, 1, 2, 3])] = [0.5, 1.0, 1.0, 3.0]
  
      assert tree.find_prefixsum_idx(0.00) == 0
      assert tree.find_prefixsum_idx(0.55) == 1
      assert tree.find_prefixsum_idx(0.99) == 1
      assert tree.find_prefixsum_idx(1.51) == 2
      assert tree.find_prefixsum_idx(3.00) == 3
      assert tree.find_prefixsum_idx(5.50) == 3
  
      tree = SumSegmentTree(4)
  
      tree[0] = 0.5
      tree[1] = 1.0
      tree[2] = 1.0
      tree[3] = 3.0
  
      assert tree.find_prefixsum_idx(0.00) == 0
      assert tree.find_prefixsum_idx(0.55) == 1
      assert tree.find_prefixsum_idx(0.99) == 1
      assert tree.find_prefixsum_idx(1.51) == 2
      assert tree.find_prefixsum_idx(3.00) == 3
      assert tree.find_prefixsum_idx(5.50) == 3
  
imports: import numpy
  from stable_baselines.common.segment_tree import SumSegmentTree, MinSegmentTree
label_desc: Use image node_id 4 for calling a global function with example usage: test_prefixsum_idx2() without return types