code: def toXML(self, writer, ttFont):
      writer.simpletag("version", value=self.version)
      writer.newline()
      writer.begintag("ratRanges")
      writer.newline()
      for ratio in self.ratRanges:
          groupIndex = ratio["groupIndex"]
          writer.simpletag(
              "ratRange",
              bCharSet=ratio["bCharSet"],
              xRatio=ratio["xRatio"],
              yStartRatio=ratio["yStartRatio"],
              yEndRatio=ratio["yEndRatio"],
              groupIndex=groupIndex,
          )
          writer.newline()
      writer.endtag("ratRanges")
      writer.newline()
      writer.begintag("groups")
      writer.newline()
      for groupIndex in range(self.numRecs):
          group = self.groups[groupIndex]
          recs = len(group)
          startsz = min(group.keys())
          endsz = max(group.keys())
          writer.begintag("group", index=groupIndex)
          writer.newline()
          writer.comment(
              "recs=%d, startsz=%d, endsz=%d" % (recs, startsz, endsz)
          )
          writer.newline()
          for yPelHeight, (yMax, yMin) in sorted(group.items()):
              writer.simpletag(
                  "record",
                  [
                      ("yPelHeight", yPelHeight),
                      ("yMax", yMax),
                      ("yMin", yMin),
                  ],
              )
              writer.newline()
          writer.endtag("group")
          writer.newline()
      writer.endtag("groups")
      writer.newline()
  
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 4 for calling the table_V_D_M_X_ obj's underlying member method code with example usage: obj.toXML(writer, ttFont) without return types