code: def compile(self, ttFont):
      self.numGMAPs = len(self.GMAPs)
      self.numGlyplets = len(self.glyphlets)
      GMAPoffsets = [0] * (self.numGMAPs + 1)
      glyphletOffsets = [0] * (self.numGlyplets + 1)
  
      dataList = [sstruct.pack(GPKGFormat, self)]
  
      pos = (
          len(dataList[0])
          + (self.numGMAPs + 1) * 4
          + (self.numGlyplets + 1) * 4
      )
      GMAPoffsets[0] = pos
      for i in range(1, self.numGMAPs + 1):
          pos += len(self.GMAPs[i - 1])
          GMAPoffsets[i] = pos
      gmapArray = array.array("I", GMAPoffsets)
      if sys.byteorder != "big":
          gmapArray.byteswap()
      dataList.append(gmapArray.tobytes())
  
      glyphletOffsets[0] = pos
      for i in range(1, self.numGlyplets + 1):
          pos += len(self.glyphlets[i - 1])
          glyphletOffsets[i] = pos
      glyphletArray = array.array("I", glyphletOffsets)
      if sys.byteorder != "big":
          glyphletArray.byteswap()
      dataList.append(glyphletArray.tobytes())
      dataList += self.GMAPs
      dataList += self.glyphlets
      data = bytesjoin(dataList)
      return data
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/G_P_K_G_.py
imports: from fontTools.misc import sstruct
  from fontTools.misc.textTools import bytesjoin, safeEval, readHex
  from .None import DefaultTable
  import sys
  import array
label_desc: Use image node_id 2 for calling the table_G_P_K_G_ obj's underlying member method code with example usage: obj.compile(ttFont) and returns: data