code: def test_merge_simple_branches():
      """test the merge_simple_branches() method"""
      f = Forest(5, np.array([2, 2, 4, 4, 4])).merge_simple_branches()
      assert f.V == 5
      f = Forest(5, np.array([1, 2, 4, 4, 4])).merge_simple_branches()
      assert f.V == 3
  
file_path: nipy/nipy/algorithms/graph/tests/test_forest.py
imports: import numpy
  from ..forest import Forest
label_desc: Use image node_id 7 for calling a global function with example usage: test_merge_simple_branches() without return types