code: def decompile(self, data, ttFont):
      if not self.apple:
          version, length, subtableFormat, coverage = struct.unpack(
              ">HHBB", data[:6]
          )
          if version != 0:
              from fontTools.ttLib import TTLibError
  
              raise TTLibError(
                  "unsupported kern subtable version: %d" % version
              )
          tupleIndex = None
          # Should we also assert length == len(data)?
          data = data[6:]
      else:
          length, coverage, subtableFormat, tupleIndex = struct.unpack(
              ">LBBH", data[:8]
          )
          data = data[8:]
      assert self.format == subtableFormat, "unsupported format"
      self.coverage = coverage
      self.tupleIndex = tupleIndex
  
      self.kernTable = kernTable = {}
  
      nPairs, searchRange, entrySelector, rangeShift = struct.unpack(
          ">HHHH", data[:8]
      )
      data = data[8:]
  
      datas = array.array("H", data[: 6 * nPairs])
      if sys.byteorder != "big":
          datas.byteswap()
      it = iter(datas)
      glyphOrder = ttFont.getGlyphOrder()
      for k in range(nPairs):
          left, right, value = next(it), next(it), next(it)
          if value >= 32768:
              value -= 65536
          try:
              kernTable[(glyphOrder[left], glyphOrder[right])] = value
          except IndexError:
              # Slower, but will not throw an IndexError on an invalid
              # glyph id.
              kernTable[
                  (
                      ttFont.getGlyphName(left),
                      ttFont.getGlyphName(right),
                  )
              ] = value
      if len(data) > 6 * nPairs + 4:  # Ignore up to 4 bytes excess
          log.warning(
              "excess data in 'kern' subtable: %d bytes",
              len(data) - 6 * nPairs,
          )
  
imports: from fontTools.ttLib import getSearchRange
  from fontTools.misc.textTools import safeEval, readHex
  from fontTools.misc.fixedTools import fixedToFloat, floatToFixed
  from .None import DefaultTable
  import struct
  import sys
  import array
  import logging
label_desc: Use image node_id 2 for calling the KernTable_format_0 obj's underlying member method code with example usage: obj.decompile(data, ttFont) without return types