code: def test_copy_subdomain():
      """Test basic construction of multiple_roi"""
      mroi = make_subdomain()
      foo_feature = [[i] * j for i, j in enumerate(mroi.get_size())]
      foo_roi_feature = np.arange(mroi.k)
      mroi.set_feature("a", foo_feature)
      mroi.set_roi_feature("b", foo_roi_feature)
      mroi_copy = mroi.copy()
      # check some properties of mroi
      assert mroi.k == 8
      for k in mroi.get_id():
          assert_array_equal(
              mroi.get_feature("a", k), foo_feature[mroi.select_id(k)]
          )
      assert_array_equal(mroi.get_roi_feature("b"), foo_roi_feature)
      # delete mroi
      del mroi
      # check mroi_copy
      assert mroi_copy.k == 8
      for k in mroi_copy.get_id():
          assert_array_equal(
              mroi_copy.get_feature("a", k),
              foo_feature[mroi_copy.select_id(k)],
          )
      assert_array_equal(
          mroi_copy.get_roi_feature("b"), foo_roi_feature
      )
  
imports: from os.path import dirname
  from os.path import join
  import numpy
  from nibabel import Nifti1Image, load
  from numpy.testing import assert_almost_equal, assert_array_equal
  from nipy.io.nibcompat import get_affine
  from ..discrete_domain import domain_from_binary_array, grid_domain_from_image
  from ..hroi import HROI_as_discrete_domain_blobs
  from ..mroi import subdomain_from_array, subdomain_from_balls
label_desc: Use image node_id 4 for calling a global function with example usage: test_copy_subdomain() without return types