code: def test_hroi_isleaf():
      """Test basic construction of a tree of isolated leaves"""
      hroi = make_hroi()
      hroi.select_roi([0] + list(range(2, 9)))
      assert hroi.k == 8
  
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 4 for calling a global function with example usage: test_hroi_isleaf() without return types