code: def test_transform_3d_input_images(affine_eye):
      # test list of 3D images
      data = np.ones((10, 11, 12))
      data[6, 7, 8] = 2
      data[9, 10, 11] = 3
      img = Nifti1Image(data, affine=affine_eye)
      imgs = [img] * 3
  
      parcellate = Parcellations(method="ward", n_parcels=20, verbose=0)
      X = parcellate.fit_transform(imgs)
  
      assert isinstance(X, list)
      # (number of samples, number of features)
      assert np.concatenate(X).shape == (3, 20)
  
      # inverse transform
      imgs_ = parcellate.inverse_transform(X)
  
      assert isinstance(imgs_, list)
  
      # test single 3D image
      X = parcellate.fit_transform(imgs[0])
      assert isinstance(X, np.ndarray)
      assert X.shape == (1, 20)
  
imports: import warnings
  import numpy
  import pandas
  import pytest
  from nibabel import Nifti1Image
  from nilearn.conftest import _affine_eye
  from nilearn.regions.parcellations import Parcellations, _check_parameters_transform
label_desc: Use image node_id 17 for calling a global function with example usage: test_transform_3d_input_images(affine_eye) without return types