code: def test_tree_set():
      """
      test Segment Tree data structure
      """
      tree = SumSegmentTree(4)
  
      tree[np.array([2, 3])] = [1.0, 3.0]
  
      assert np.isclose(tree.sum(), 4.0)
      assert np.isclose(tree.sum(0, 2), 0.0)
      assert np.isclose(tree.sum(0, 3), 1.0)
      assert np.isclose(tree.sum(2, 3), 1.0)
      assert np.isclose(tree.sum(2, -1), 1.0)
      assert np.isclose(tree.sum(2, 4), 4.0)
  
      tree = SumSegmentTree(4)
      tree[2] = 1.0
      tree[3] = 3.0
  
      assert np.isclose(tree.sum(), 4.0)
      assert np.isclose(tree.sum(0, 2), 0.0)
      assert np.isclose(tree.sum(0, 3), 1.0)
      assert np.isclose(tree.sum(2, 3), 1.0)
      assert np.isclose(tree.sum(2, -1), 1.0)
      assert np.isclose(tree.sum(2, 4), 4.0)
  
imports: import numpy
  from stable_baselines.common.segment_tree import SumSegmentTree, MinSegmentTree
label_desc: Use image node_id 1 for calling a global function with example usage: test_tree_set() without return types