code: def test_errors_raised_in_check_parameters_fit(method, test_image):
      """Test whether an error is raised or not given
      a false method type.
      """
      with pytest.raises(
          ValueError,
          match=(
              f"The method you have selected is not implemented '{method}'"
          ),
      ):
          Parcellations(method=method, verbose=0).fit(test_image)
  
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 4 for calling a global function with example usage: test_errors_raised_in_check_parameters_fit(method, test_image) without return types