code: def test_transform_inverse_transform_with_mask(
      shape, make_mini_img, assert_img_equal, mini_mask
  ):
      img = make_mini_img(shape)
      masker = SurfaceMasker(mini_mask).fit(img)
      masked_img = masker.transform(img)
      assert masked_img.shape == shape + (img.shape[-1] - 2,)
      assert np.array_equal(
          masked_img.ravel()[:7], [2, 3, 4, 20, 30, 40, 50.0]
      )
      unmasked_img = masker.inverse_transform(masked_img)
      expected_data = {k: v.copy() for (k, v) in img.data.items()}
      for v in expected_data.values():
          v[..., 0] = 0.0
      expected_img = SurfaceImage(img.mesh, expected_data)
      assert_img_equal(expected_img, unmasked_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 8 for calling a global function with example usage: test_transform_inverse_transform_with_mask(shape, make_mini_img, assert_img_equal, mini_mask) without return types