code: def test_chunk_order(self, tmp_path):
      with Image.open("Tests/images/icc_profile.png") as im:
          test_file = str(tmp_path / "temp.png")
          im.convert("P").save(test_file, dpi=(100, 100))
  
      chunks = self.get_chunks(test_file)
  
      # https://www.w3.org/TR/PNG/#5ChunkOrdering
      # IHDR - shall be first
      assert chunks.index(b"IHDR") == 0
      # PLTE - before first IDAT
      assert chunks.index(b"PLTE") < chunks.index(b"IDAT")
      # iCCP - before PLTE and IDAT
      assert chunks.index(b"iCCP") < chunks.index(b"PLTE")
      assert chunks.index(b"iCCP") < chunks.index(b"IDAT")
      # tRNS - after PLTE, before IDAT
      assert chunks.index(b"tRNS") > chunks.index(b"PLTE")
      assert chunks.index(b"tRNS") < chunks.index(b"IDAT")
      # pHYs - before IDAT
      assert chunks.index(b"pHYs") < chunks.index(b"IDAT")
  
imports: from __future__ import annotations
  import re
  import sys
  import warnings
  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 36 for calling the TestFilePng obj's underlying member method code with example usage: obj.test_chunk_order(tmp_path) without return types