code: def toXML(self, xmlWriter, ttFont):
      if self.graphicType is None:
          # TODO: ignore empty glyphs?
          # a glyph data entry is required for each glyph,
          # but empty ones can be calculated at compile time
          xmlWriter.simpletag("glyph", name=self.glyphName)
          xmlWriter.newline()
          return
      xmlWriter.begintag(
          "glyph",
          graphicType=self.graphicType,
          name=self.glyphName,
          originOffsetX=self.originOffsetX,
          originOffsetY=self.originOffsetY,
      )
      xmlWriter.newline()
      if self.graphicType == "dupe":
          # graphicType == "dupe" is a reference to another glyph id.
          xmlWriter.simpletag("ref", glyphname=self.referenceGlyphName)
      else:
          xmlWriter.begintag("hexdata")
          xmlWriter.newline()
          xmlWriter.dumphex(self.imageData)
          xmlWriter.endtag("hexdata")
      xmlWriter.newline()
      xmlWriter.endtag("glyph")
      xmlWriter.newline()
  
file_path: catboost/contrib/python/fonttools/fontTools/ttLib/tables/sbixGlyph.py
imports: from fontTools.misc import sstruct
  from fontTools.misc.textTools import readHex, safeEval
  import struct
label_desc: Use image node_id 4 for calling the Glyph obj's underlying member method code with example usage: obj.toXML(xmlWriter, ttFont) without return types