code: def assert_img_equal():
      def f(img_1, img_2):
          assert set(img_1.data.keys()) == set(img_2.data.keys())
          for key in img_1.data:
              assert np.array_equal(img_1.data[key], img_2.data[key])
  
      return f
  
file_path: nilearn/nilearn/experimental/surface/tests/conftest.py
imports: from typing import Callable
  import numpy
  import pytest
  from nilearn.experimental.surface import InMemoryMesh, PolyMesh, SurfaceImage, load_fsaverage
label_desc: Use image node_id 8 for calling a global function with example usage: assert_img_equal() and returns: f