code: def compile(self, ttFont):
      nPairs = min(len(self.kernTable), 0xFFFF)
      searchRange, entrySelector, rangeShift = getSearchRange(nPairs, 6)
      searchRange &= 0xFFFF
      entrySelector = min(entrySelector, 0xFFFF)
      rangeShift = min(rangeShift, 0xFFFF)
      data = struct.pack(
          ">HHHH", nPairs, searchRange, entrySelector, rangeShift
      )
  
      # yeehee! (I mean, turn names into indices)
      try:
          reverseOrder = ttFont.getReverseGlyphMap()
          kernTable = sorted(
              (reverseOrder[left], reverseOrder[right], value)
              for ((left, right), value) in self.kernTable.items()
          )
      except KeyError:
          # Slower, but will not throw KeyError on invalid glyph id.
          getGlyphID = ttFont.getGlyphID
          kernTable = sorted(
              (getGlyphID(left), getGlyphID(right), value)
              for ((left, right), value) in self.kernTable.items()
          )
  
      for left, right, value in kernTable:
          data = data + struct.pack(">HHh", left, right, value)
  
      if not self.apple:
          version = 0
          length = len(data) + 6
          if length >= 0x10000:
              log.warning(
                  '"kern" subtable overflow, '
                  "truncating length value while preserving pairs."
              )
              length &= 0xFFFF
          header = struct.pack(
              ">HHBB", version, length, self.format, self.coverage
          )
      else:
          if self.tupleIndex is None:
              # sensible default when compiling a TTX from an old fonttools
              # or when inserting a Windows-style format 0 subtable into an
              # Apple version=1.0 kern table
              log.warning("'tupleIndex' is None; default to 0")
              self.tupleIndex = 0
          length = len(data) + 8
          header = struct.pack(
              ">LBBH",
              length,
              self.coverage,
              self.format,
              self.tupleIndex,
          )
      return header + data
  
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 3 for calling the KernTable_format_0 obj's underlying member method code with example usage: obj.compile(ttFont) and returns: unknown