code: def test_inverse_transform_single_nifti_image(
      method, n_parcel, test_image_2
  ):
      parcellate = Parcellations(
          method=method, n_parcels=n_parcel, verbose=0
      )
      parcellate.fit(test_image_2)
  
      assert parcellate.labels_img_ is not None
  
      fmri_reduced = parcellate.transform(test_image_2)
  
      assert isinstance(fmri_reduced, np.ndarray)
      # Shape matching with (scans, regions)
      assert fmri_reduced.shape == (10, n_parcel)
  
      fmri_compressed = parcellate.inverse_transform(fmri_reduced)
  
      # A single Nifti image for single subject input
      assert isinstance(fmri_compressed, Nifti1Image)
      # returns shape of fmri_img
      assert fmri_compressed.shape == test_image_2.shape
  
      # fmri_reduced in a list
      fmri_compressed = parcellate.inverse_transform([fmri_reduced])
  
      # A single Nifti image for single subject input
      assert isinstance(fmri_compressed, Nifti1Image)
      # returns shape of fmri_img
      assert fmri_compressed.shape == test_image_2.shape
  
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 16 for calling a global function with example usage: test_inverse_transform_single_nifti_image(method, n_parcel, test_image_2) without return types