code: def test_padded_idat(self):
      # This image has been manually hexedited
      # so that the IDAT chunk has padding at the end
      # Set MAXBLOCK to the length of the actual data
      # so that the decoder finishes reading before the chunk ends
      MAXBLOCK = ImageFile.MAXBLOCK
      ImageFile.MAXBLOCK = 45
      ImageFile.LOAD_TRUNCATED_IMAGES = True
  
      with Image.open("Tests/images/padded_idat.png") as im:
          im.load()
  
          ImageFile.MAXBLOCK = MAXBLOCK
          ImageFile.LOAD_TRUNCATED_IMAGES = False
  
          assert_image_equal_tofile(im, "Tests/images/bw_gradient.png")
  
imports: import re
  import sys
  import zlib
  from io import BytesIO
  import pytest
  from PIL import Image, ImageFile, PngImagePlugin, features
  from .helper import PillowLeakTestCase, assert_image, assert_image_equal, assert_image_equal_tofile, hopper, is_win32, mark_if_feature_version, skip_unless_feature
label_desc: Use image node_id 41 for calling the TestFilePng obj's underlying member method code with example usage: obj.test_padded_idat() without return types