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