code: def test_prfx():
      """Test the ability to construct parcel features and random effects models"""
      # step 1:  generate some synthetic data
      n_subj = 10
      shape = (30, 30)
      dataset = surrogate_2d_dataset(n_subj=n_subj, shape=shape)
  
      # step 2 : prepare all the information for the parcellation
      nb_parcel = 10
      domain = grid_domain_from_binary_array(dataset[0] ** 2, np.eye(3))
      ldata = np.reshape(dataset, (n_subj, np.prod(shape), 1))
  
      # step 3 : run the algorithm
      Pa = hparcel(domain, ldata, nb_parcel)
      pdata = Pa.make_feature(
          "functional", np.rollaxis(np.array(ldata), 1, 0)
      )
      one_sample = np.squeeze(pdata.mean(0) / pdata.std(0))
      assert np.shape(one_sample) == (nb_parcel,)
      assert one_sample.mean() < 1
      assert one_sample.mean() > -1
  
file_path: nipy/nipy/labs/spatial_models/tests/test_parcel.py
imports: import numpy
  from nipy.algorithms.graph.field import field_from_coo_matrix_and_data
  from ...utils.simul_multisubject_fmri_dataset import surrogate_2d_dataset
  from ..discrete_domain import grid_domain_from_binary_array
  from ..hierarchical_parcellation import hparcel
  from ..parcellation import MultiSubjectParcellation
label_desc: Use image node_id 6 for calling a global function with example usage: test_prfx() without return types