code: def compile(self, ttFont):
      version = 0  # ignore self.version
      numRanges = len(self.gaspRange)
      data = b""
      items = sorted(self.gaspRange.items())
      for rangeMaxPPEM, rangeGaspBehavior in items:
          data = data + struct.pack(
              ">HH", rangeMaxPPEM, rangeGaspBehavior
          )
          if rangeGaspBehavior & ~(GASP_GRIDFIT | GASP_DOGRAY):
              version = 1
      data = struct.pack(">HH", version, numRanges) + data
      return data
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/_g_a_s_p.py
imports: from fontTools.misc.textTools import safeEval
  from .None import DefaultTable
  import struct
label_desc: Use image node_id 2 for calling the table__g_a_s_p obj's underlying member method code with example usage: obj.compile(ttFont) and returns: data