code: def test_set_feature():
      """Test the feature building capability"""
      mroi = make_subdomain()
      data = np.random.randn(np.prod(shape))
      feature_data = [
          data[mroi.select_id(k, roi=False)] for k in mroi.get_id()
      ]
      mroi.set_feature("data", feature_data)
      get_feature_output = mroi.get_feature("data")
      assert_array_equal(
          [len(k) for k in mroi.get_feature("data")], mroi.get_size()
      )
      for k in mroi.get_id():
          assert_array_equal(
              mroi.get_feature("data", k),
              data[mroi.select_id(k, roi=False)],
          )
          assert_array_equal(
              get_feature_output[k], data[mroi.select_id(k, roi=False)]
          )
  
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 12 for calling a global function with example usage: test_set_feature() without return types