code: def test_mask_img_fit_shape_mismatch(
      flip_img, mini_mask, make_mini_img, assert_img_equal
  ):
      img = make_mini_img()
      masker = SurfaceMasker(mini_mask)
      with pytest.raises(ValueError, match="number of vertices"):
          masker.fit(flip_img(img))
      # fitting with the number of vertices is ok
      masker.fit(img)
      # fitting with the same number of vertices and extra dimensions (surface
      # timeseries) is ok
      masker.fit(make_mini_img((2,)))
      assert_img_equal(mini_mask, masker.mask_img_)
  
file_path: nilearn/nilearn/experimental/surface/tests/test_maskers.py
imports: import numpy
  import pytest
  from nilearn.experimental.surface import SurfaceImage, SurfaceMasker
label_desc: Use image node_id 1 for calling a global function with example usage: test_mask_img_fit_shape_mismatch(flip_img, mini_mask, make_mini_img, assert_img_equal) without return types