code: def compile(self, ttFont):
      if not (self.version == 0 or self.version == 1):
          from fontTools import ttLib
  
          raise ttLib.TTLibError(
              "unknown format for VDMX table: version %s" % self.version
          )
      data = sstruct.pack(VDMX_HeaderFmt, self)
      for ratio in self.ratRanges:
          data += sstruct.pack(VDMX_RatRangeFmt, ratio)
      # recalculate offsets to VDMX groups
      for offset in self._getOffsets():
          data += struct.pack(">H", offset)
      for group in self.groups:
          recs = len(group)
          startsz = min(group.keys())
          endsz = max(group.keys())
          gHeader = {"recs": recs, "startsz": startsz, "endsz": endsz}
          data += sstruct.pack(VDMX_GroupFmt, gHeader)
          for yPelHeight, (yMax, yMin) in sorted(group.items()):
              vTable = {
                  "yPelHeight": yPelHeight,
                  "yMax": yMax,
                  "yMin": yMin,
              }
              data += sstruct.pack(VDMX_vTableFmt, vTable)
      return data
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/V_D_M_X_.py
imports: from .None import DefaultTable
  from fontTools.misc import sstruct
  from fontTools.misc.textTools import safeEval
  import struct
label_desc: Use image node_id 3 for calling the table_V_D_M_X_ obj's underlying member method code with example usage: obj.compile(ttFont) and returns: data