code: def _open(self):
      if not _accept(self.fp.read(4)):
          msg = "not a DDS file"
          raise SyntaxError(msg)
      (header_size,) = struct.unpack("<I", self.fp.read(4))
      if header_size != 124:
          msg = f"Unsupported header size {repr(header_size)}"
          raise OSError(msg)
      header_bytes = self.fp.read(header_size - 4)
      if len(header_bytes) != 120:
          msg = f"Incomplete header: {len(header_bytes)} bytes"
          raise OSError(msg)
      header = BytesIO(header_bytes)
  
      flags, height, width = struct.unpack("<3I", header.read(12))
      self._size = (width, height)
      self._mode = "RGBA"
  
      pitch, depth, mipmaps = struct.unpack("<3I", header.read(12))
      struct.unpack("<11I", header.read(44))  # reserved
  
      # pixel format
      pfsize, pfflags = struct.unpack("<2I", header.read(8))
      fourcc = header.read(4)
      bitcount, rmask, gmask, bmask, amask = struct.unpack(
          "<5I", header.read(20)
      )
  
      if fourcc == b"DXT1":
          self.decoder = "DXT1"
      elif fourcc == b"DXT5":
          self.decoder = "DXT5"
      else:
          msg = f"Unimplemented pixel format {fourcc}"
          raise NotImplementedError(msg)
  
      self.tile = [
          (self.decoder, (0, 0) + self.size, 0, (self.mode, 0, 1))
      ]
  
imports: from __future__ import annotations
  import struct
  from io import BytesIO
  from PIL import Image, ImageFile
label_desc: Use image node_id 1 for calling the DdsImageFile obj's underlying member method code with example usage: obj._open() without return types