code: def write_png_depth(filename: str, depth: int) -> None:
      """Write the special tEXt chunk indicating the depth to a PNG file.
  
      The chunk is placed immediately before the special IEND chunk.
      """
      data = struct.pack("!i", depth)
      with open(filename, "r+b") as f:
          # seek to the beginning of the IEND chunk
          f.seek(-LEN_IEND, 2)
          # overwrite it with the depth chunk
          f.write(DEPTH_CHUNK_LEN + DEPTH_CHUNK_START + data)
          # calculate the checksum over chunk name and data
          crc = binascii.crc32(DEPTH_CHUNK_START + data) & 0xFFFFFFFF
          f.write(struct.pack("!I", crc))
          # replace the IEND chunk
          f.write(IEND_CHUNK)
  
imports: from __future__ import annotations
  import binascii
  import struct
label_desc: Use image node_id 2 for calling a global function with example usage: write_png_depth(filename, depth) without return types