code: def _open(self):
      # HEAD
      s = self.fp.read(128)
      magic = i16(s[4:6])
      if not (
          magic in [0xAF11, 0xAF12]
          and i16(s[14:16]) in [0, 3]  # flags
          and s[20:22] == b"\x00\x00"  # reserved
      ):
          raise SyntaxError("not an FLI/FLC file")
  
      # frames
      self.__framecount = i16(s[6:8])
  
      # image characteristics
      self.mode = "P"
      self._size = i16(s[8:10]), i16(s[10:12])
  
      # animation speed
      duration = i32(s[16:20])
      if magic == 0xAF11:
          duration = (duration * 1000) // 70
      self.info["duration"] = duration
  
      # look for palette
      palette = [(a, a, a) for a in range(256)]
  
      s = self.fp.read(16)
  
      self.__offset = 128
  
      if i16(s[4:6]) == 0xF100:
          # prefix chunk; ignore it
          self.__offset = self.__offset + i32(s)
          s = self.fp.read(16)
  
      if i16(s[4:6]) == 0xF1FA:
          # look for palette chunk
          s = self.fp.read(6)
          if i16(s[4:6]) == 11:
              self._palette(palette, 2)
          elif i16(s[4:6]) == 4:
              self._palette(palette, 0)
  
      palette = [o8(r) + o8(g) + o8(b) for (r, g, b) in palette]
      self.palette = ImagePalette.raw("RGB", b"".join(palette))
  
      # set things up to decode first frame
      self.__frame = -1
      self.__fp = self.fp
      self.__rewind = self.fp.tell()
      self.seek(0)
  
file_path: catboost/contrib/python/Pillow/py2/PIL/FliImagePlugin.py
imports: from .None import Image, ImageFile, ImagePalette
  from ._binary import i8, i16le, i32le, o8
label_desc: Use image node_id 1 for calling the FliImageFile obj's underlying member method code with example usage: obj._open() without return types