code: def remove_hints(self):
      cff = self.cff
      for fontname in cff.keys():
          font = cff[fontname]
          cs = font.CharStrings
          # This can be tricky, but doesn't have to. What we do is:
          #
          # - Run all used glyph charstrings and recurse into subroutines,
          # - For each charstring (including subroutines), if it has any
          #   of the hint stem operators, we mark it as such.
          #   Upon returning, for each charstring we note all the
          #   subroutine calls it makes that (recursively) contain a stem,
          # - Dropping hinting then consists of the following two ops:
          #   * Drop the piece of the program in each charstring before the
          #     last call to a stem op or a stem-calling subroutine,
          #   * Drop all hintmask operations.
          # - It's trickier... A hintmask right after hints and a few numbers
          #    will act as an implicit vstemhm. As such, we track whether
          #    we have seen any non-hint operators so far and do the right
          #    thing, recursively... Good luck understanding that :(
          css = set()
          for g in font.charset:
              c, _ = cs.getItemAndSelector(g)
              c.decompile()
              subrs = getattr(c.private, "Subrs", [])
              decompiler = _DehintingT2Decompiler(
                  css,
                  subrs,
                  c.globalSubrs,
                  c.private.nominalWidthX,
                  c.private.defaultWidthX,
                  c.private,
              )
              decompiler.execute(c)
              c.width = decompiler.width
          for charstring in css:
              charstring.drop_hints()
          del css
  
          # Drop font-wide hinting values
          all_privs = []
          if hasattr(font, "FDArray"):
              all_privs.extend(fd.Private for fd in font.FDArray)
          else:
              all_privs.append(font.Private)
          for priv in all_privs:
              for k in [
                  "BlueValues",
                  "OtherBlues",
                  "FamilyBlues",
                  "FamilyOtherBlues",
                  "BlueScale",
                  "BlueShift",
                  "BlueFuzz",
                  "StemSnapH",
                  "StemSnapV",
                  "StdHW",
                  "StdVW",
                  "ForceBold",
                  "LanguageGroup",
                  "ExpansionFactor",
              ]:
                  if hasattr(priv, k):
                      setattr(priv, k, None)
      self.remove_unused_subroutines()
  
imports: from fontTools.misc import psCharStrings
  from fontTools import ttLib
  from fontTools.pens.basePen import NullPen
  from fontTools.misc.roundTools import otRound
  from fontTools.misc.loggingTools import deprecateFunction
  from fontTools.subset.util import _add_method, _uniq_sort
label_desc: Use image node_id 10 for calling a global function with example usage: remove_hints() without return types