code: def decompile(self, data, ttFont):
      pos = 0  # track current position from to start of VDMX table
      dummy, data = sstruct.unpack2(VDMX_HeaderFmt, data, self)
      pos += sstruct.calcsize(VDMX_HeaderFmt)
      self.ratRanges = []
      for i in range(self.numRatios):
          ratio, data = sstruct.unpack2(VDMX_RatRangeFmt, data)
          pos += sstruct.calcsize(VDMX_RatRangeFmt)
          # the mapping between a ratio and a group is defined further below
          ratio["groupIndex"] = None
          self.ratRanges.append(ratio)
      lenOffset = struct.calcsize(">H")
      _offsets = []  # temporarily store offsets to groups
      for i in range(self.numRatios):
          offset = struct.unpack(">H", data[0:lenOffset])[0]
          data = data[lenOffset:]
          pos += lenOffset
          _offsets.append(offset)
      self.groups = []
      for groupIndex in range(self.numRecs):
          # the offset to this group from beginning of the VDMX table
          currOffset = pos
          group, data = sstruct.unpack2(VDMX_GroupFmt, data)
          # the group lenght and bounding sizes are re-calculated on compile
          recs = group.pop("recs")
          startsz = group.pop("startsz")
          endsz = group.pop("endsz")
          pos += sstruct.calcsize(VDMX_GroupFmt)
          for j in range(recs):
              vTable, data = sstruct.unpack2(VDMX_vTableFmt, data)
              vTableLength = sstruct.calcsize(VDMX_vTableFmt)
              pos += vTableLength
              # group is a dict of (yMax, yMin) tuples keyed by yPelHeight
              group[vTable["yPelHeight"]] = (
                  vTable["yMax"],
                  vTable["yMin"],
              )
          # make sure startsz and endsz match the calculated values
          minSize = min(group.keys())
          maxSize = max(group.keys())
          assert startsz == minSize, (
              "startsz (%s) must equal min yPelHeight (%s): group %d"
              % (
                  group.startsz,
                  minSize,
                  groupIndex,
              )
          )
          assert (
              endsz == maxSize
          ), "endsz (%s) must equal max yPelHeight (%s): group %d" % (
              group.endsz,
              maxSize,
              groupIndex,
          )
          self.groups.append(group)
          # match the defined offsets with the current group's offset
          for offsetIndex, offsetValue in enumerate(_offsets):
              # when numRecs < numRatios there can more than one ratio range
              # sharing the same VDMX group
              if currOffset == offsetValue:
                  # map the group with the ratio range thas has the same
                  # index as the offset to that group (it took me a while..)
                  self.ratRanges[offsetIndex]["groupIndex"] = groupIndex
      # check that all ratio ranges have a group
      for i in range(self.numRatios):
          ratio = self.ratRanges[i]
          if ratio["groupIndex"] is None:
              from fontTools import ttLib
  
              raise ttLib.TTLibError(
                  "no group defined for ratRange %d" % i
              )
  
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 1 for calling the table_V_D_M_X_ obj's underlying member method code with example usage: obj.decompile(data, ttFont) without return types