code: def test_upward():
      """test the propagate_upward() method"""
      f = simple_forest()
      assert (
          f.propagate_upward([0, 0, 1, 3, 1]) == [0, 0, 0, 3, 1]
      ).all()
      assert (
          f.propagate_upward([0, 0, 5, 0, 2]) == [0, 0, 0, 0, 0]
      ).all()
  
file_path: nipy/nipy/algorithms/graph/tests/test_forest.py
imports: import numpy
  from ..forest import Forest
label_desc: Use image node_id 14 for calling a global function with example usage: test_upward() without return types