code: def _test_parcel_analysis(
      smooth_method, parcel_info, vcon=False, full_res=True
  ):
      con_imgs, parcel_img = make_fake_data()
      if vcon:
          vcon_imgs = con_imgs
      else:
          vcon_imgs = None
      g = ParcelAnalysis(
          con_imgs,
          parcel_img,
          vcon_imgs=vcon_imgs,
          smooth_method=smooth_method,
          parcel_info=parcel_info,
      )
      t_map_img = g.t_map()
      assert_array_equal(t_map_img.shape, SIZE)
      assert_array_equal(xyz_affine(t_map_img), AFFINE)
      parcel_mu_img, parcel_prob_img = g.parcel_maps(full_res=full_res)
      assert_array_equal(parcel_mu_img.shape, SIZE)
      assert_array_equal(xyz_affine(parcel_mu_img), AFFINE)
      assert_array_equal(parcel_prob_img.shape, SIZE)
      assert_array_equal(xyz_affine(parcel_prob_img), AFFINE)
      assert parcel_prob_img.get_fdata().max() <= 1
      assert parcel_prob_img.get_fdata().min() >= 0
      outside = parcel_img.get_fdata() == 0
      assert_array_equal(t_map_img.get_fdata()[outside], 0)
      assert_array_equal(parcel_mu_img.get_fdata()[outside], 0)
      assert_array_equal(parcel_prob_img.get_fdata()[outside], 0)
  
file_path: nipy/nipy/algorithms/group/tests/test_parcel_analysis.py
imports: import os
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ....core.image.image_spaces import make_xyz_image, xyz_affine
  from ..parcel_analysis import ParcelAnalysis, _smooth_image_pair, parcel_analysis
label_desc: Use image node_id 3 for calling a global function with example usage: _test_parcel_analysis(smooth_method, parcel_info, vcon, full_res) without return types