code: def _dxt5(data, width, height):
      # TODO implement this function as pixel format in decode.c
      ret = bytearray(4 * width * height)
  
      for y in range(0, height, 4):
          for x in range(0, width, 4):
              a0, a1, ac0, ac1, c0, c1, code = struct.unpack(
                  "<2BHI2HI", data.read(16)
              )
  
              r0, g0, b0 = _decode565(c0)
              r1, g1, b1 = _decode565(c1)
  
              for j in range(4):
                  for i in range(4):
                      ai = 3 * (4 * j + i)
                      alpha = _dxtc_alpha(a0, a1, ac0, ac1, ai)
  
                      cc = (code >> 2 * (4 * j + i)) & 3
                      if cc == 0:
                          r, g, b = r0, g0, b0
                      elif cc == 1:
                          r, g, b = r1, g1, b1
                      elif cc == 2:
                          r, g, b = (
                              _c2a(r0, r1),
                              _c2a(g0, g1),
                              _c2a(b0, b1),
                          )
                      elif cc == 3:
                          r, g, b = (
                              _c3(r0, r1),
                              _c3(g0, g1),
                              _c3(b0, b1),
                          )
  
                      idx = 4 * ((y + j) * width + x + i)
                      ret[idx : idx + 4] = struct.pack(
                          "4B", r, g, b, alpha
                      )
  
      return bytes(ret)
  
imports: from __future__ import annotations
  import struct
  from io import BytesIO
  from PIL import Image, ImageFile
label_desc: Use image node_id 7 for calling a global function with example usage: _dxt5(data, width, height) and returns: bytes