code: def assert_image(im, data, delta=0):
      it = iter(im.getdata())
      for data_row in data:
          im_row = [next(it) for _ in range(im.size[0])]
          if any(
              abs(data_v - im_v) > delta
              for data_v, im_v in zip(data_row, im_row)
          ):
              assert im_row == data_row
      with pytest.raises(StopIteration):
          next(it)
  
file_path: pillow/Tests/test_box_blur.py
imports: from __future__ import annotations
  import pytest
  from PIL import Image, ImageFilter
label_desc: Use image node_id 3 for calling a global function with example usage: assert_image(im, data, delta) without return types