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