code: def test_tree_set(self):
      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)
      assert np.isclose(tree.sum(2), 4.0)
  
file_path: ray/rllib/utils/replay_buffers/tests/test_segment_tree_replay_buffer_api.py
imports: import numpy
  import unittest
  from ray.rllib.execution.segment_tree import SumSegmentTree, MinSegmentTree
label_desc: Use image node_id 1 for calling the TestSegmentTree obj's underlying member method code with example usage: obj.test_tree_set() without return types