code: def test_all_distances():
      """test the all_distances() methods"""
      f = simple_forest()
      dg = f.all_distances()
      print(dg)
      assert dg[0, 3] == 3.0
      assert dg.max() == 3.0
      assert dg.min() == 0.0
      assert dg.shape == (5, 5)
      dg = f.all_distances(1)
      assert dg[3] == 3.0
  
file_path: nipy/nipy/algorithms/graph/tests/test_forest.py
imports: import numpy
  from ..forest import Forest
label_desc: Use image node_id 8 for calling a global function with example usage: test_all_distances() without return types