code: def toXML(self, writer, ttFont):
      names = sorted(self.metrics.keys())
      for glyphName in names:
          advance, sb = self.metrics[glyphName]
          writer.simpletag(
              "mtx",
              [
                  ("name", glyphName),
                  (self.advanceName, advance),
                  (self.sideBearingName, sb),
              ],
          )
          writer.newline()
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/_h_m_t_x.py
imports: from fontTools.misc.roundTools import otRound
  from fontTools import ttLib
  from fontTools.misc.textTools import safeEval
  from .None import DefaultTable
  import sys
  import struct
  import array
  import logging
label_desc: Use image node_id 3 for calling the table__h_m_t_x obj's underlying member method code with example usage: obj.toXML(writer, ttFont) without return types