code: def test_hroi_isleaf_2():
      """Test tree pruning, with parent remapping"""
      hroi = make_hroi()
      # import pdb; pdb.set_trace()
      hroi.select_roi(list(range(1, 9)))
      assert_array_equal(hroi.parents, np.arange(8).astype(np.int_))
  
imports: import numpy
  from numpy.testing import assert_array_equal
  from ..discrete_domain import domain_from_binary_array
  from ..hroi import HROI_as_discrete_domain_blobs, make_hroi_from_subdomain
  from ..mroi import subdomain_from_array
label_desc: Use image node_id 5 for calling a global function with example usage: test_hroi_isleaf_2() without return types