code: def visit(visitor, obj, attr, cff):
      cff.desubroutinize()
      topDict = cff.topDictIndex[0]
      varStore = getattr(topDict, "VarStore", None)
      getNumRegions = (
          varStore.getNumRegions if varStore is not None else None
      )
      privates = set()
      for fontname in cff.keys():
          font = cff[fontname]
          cs = font.CharStrings
          for g in font.charset:
              c, _ = cs.getItemAndSelector(g)
              privates.add(c.private)
  
              commands = cffSpecializer.programToCommands(
                  c.program, getNumRegions=getNumRegions
              )
              for op, args in commands:
                  if op == "vsindex":
                      continue
                  _cff_scale(visitor, args)
              c.program[:] = cffSpecializer.commandsToProgram(commands)
  
          # Annoying business of scaling numbers that do not matter whatsoever
  
          for attr in (
              "UnderlinePosition",
              "UnderlineThickness",
              "FontBBox",
              "StrokeWidth",
          ):
              value = getattr(topDict, attr, None)
              if value is None:
                  continue
              if isinstance(value, list):
                  _cff_scale(visitor, value)
              else:
                  setattr(topDict, attr, visitor.scale(value))
  
          for i in range(6):
              topDict.FontMatrix[i] /= visitor.scaleFactor
  
          for private in privates:
              for attr in (
                  "BlueValues",
                  "OtherBlues",
                  "FamilyBlues",
                  "FamilyOtherBlues",
                  # "BlueScale",
                  # "BlueShift",
                  # "BlueFuzz",
                  "StdHW",
                  "StdVW",
                  "StemSnapH",
                  "StemSnapV",
                  "defaultWidthX",
                  "nominalWidthX",
              ):
                  value = getattr(private, attr, None)
                  if value is None:
                      continue
                  if isinstance(value, list):
                      _cff_scale(visitor, value)
                  else:
                      setattr(private, attr, visitor.scale(value))
  
imports: from fontTools.ttLib.ttVisitor import TTVisitor
  import fontTools.ttLib
  import fontTools.ttLib.tables.otBase
  import fontTools.ttLib.tables.otTables
  from fontTools.cffLib import VarStoreData
  import fontTools.cffLib.specializer
  from fontTools.varLib import builder
  from fontTools.misc.fixedTools import otRound
  from fontTools.ttLib.tables._g_l_y_f import VarComponentFlags
label_desc: Use image node_id 8 for calling a global function with example usage: visit(visitor, obj, attr, cff) without return types