code: def test_parcel_intra_from_3d_images_list(in_tmp_path):
      """Test that a parcellation is generated, starting from a list of 3D images"""
      # Generate an image
      shape = (10, 10, 10)
      n_parcel, nn, mu = 10, 6, 1.0
      method = "ward"
      mask_image = Nifti1Image(np.ones(shape).astype("u1"), np.eye(4))
  
      data_image = ["image_%d.nii" % i for i in range(5)]
      for datim in data_image:
          surrogate_3d_dataset(mask=mask_image, out_image_file=datim)
  
      # run the algo
      osp = fixed_parcellation(
          mask_image, data_image, n_parcel, nn, method, in_tmp_path, mu
      )
      assert exists(f"parcel_{method}.nii")
      assert osp.k == n_parcel
  
file_path: nipy/nipy/labs/spatial_models/tests/test_parcel_io.py
imports: from os.path import exists
  import numpy
  from nibabel import Nifti1Image, save
  from numpy.testing import assert_array_equal
  from ...utils.simul_multisubject_fmri_dataset import surrogate_3d_dataset
  from ..discrete_domain import grid_domain_from_shape
  from ..hierarchical_parcellation import hparcel
  from ..parcel_io import fixed_parcellation, mask_parcellation, parcellation_based_analysis
label_desc: Use image node_id 4 for calling a global function with example usage: test_parcel_intra_from_3d_images_list(in_tmp_path) without return types