code: def test_max_interval_tree():
      tree = MinSegmentTree(4)
  
      tree[0] = 1.0
      tree[2] = 0.5
      tree[3] = 3.0
  
      assert np.isclose(tree.min(), 0.5)
      assert np.isclose(tree.min(0, 2), 1.0)
      assert np.isclose(tree.min(0, 3), 0.5)
      assert np.isclose(tree.min(0, -1), 0.5)
      assert np.isclose(tree.min(2, 4), 0.5)
      assert np.isclose(tree.min(3, 4), 3.0)
  
      tree[2] = 0.7
  
      assert np.isclose(tree.min(), 0.7)
      assert np.isclose(tree.min(0, 2), 1.0)
      assert np.isclose(tree.min(0, 3), 0.7)
      assert np.isclose(tree.min(0, -1), 0.7)
      assert np.isclose(tree.min(2, 4), 0.7)
      assert np.isclose(tree.min(3, 4), 3.0)
  
      tree[2] = 4.0
  
      assert np.isclose(tree.min(), 1.0)
      assert np.isclose(tree.min(0, 2), 1.0)
      assert np.isclose(tree.min(0, 3), 1.0)
      assert np.isclose(tree.min(0, -1), 1.0)
      assert np.isclose(tree.min(2, 4), 3.0)
      assert np.isclose(tree.min(2, 3), 4.0)
      assert np.isclose(tree.min(2, -1), 4.0)
      assert np.isclose(tree.min(3, 4), 3.0)
  
imports: import numpy
  from baselines.common.segment_tree import SumSegmentTree, MinSegmentTree
label_desc: Use image node_id 5 for calling a global function with example usage: test_max_interval_tree() without return types