code: def drop_implied_oncurve_points(*masters: TTFont) -> int:
      """Drop impliable on-curve points from all the simple glyphs in masters.
  
      In TrueType glyf outlines, on-curve points can be implied when they are located
      exactly at the midpoint of the line connecting two consecutive off-curve points.
  
      The input masters' glyf tables are assumed to contain same-named glyphs that are
      interpolatable. Oncurve points are only dropped if they can be implied for all
      the masters. The fonts are modified in-place.
  
      Args:
          masters: The TTFont(s) to modify
  
      Returns:
          The total number of points that were dropped if any.
  
      Reference:
      https://developer.apple.com/fonts/TrueType-Reference-Manual/RM01/Chap1.html
      """
  
      count = 0
      glyph_masters = defaultdict(list)
      # multiple DS source may point to the same TTFont object and we want to
      # avoid processing the same glyph twice as they are modified in-place
      for font in {id(m): m for m in masters}.values():
          glyf = font["glyf"]
          for glyphName in glyf.keys():
              glyph_masters[glyphName].append(glyf[glyphName])
      count = 0
      for glyphName, glyphs in glyph_masters.items():
          try:
              dropped = dropImpliedOnCurvePoints(*glyphs)
          except ValueError as e:
              # we don't fail for incompatible glyphs in _add_gvar so we shouldn't here
              log.warning(
                  "Failed to drop implied oncurves for %r: %s",
                  glyphName,
                  e,
              )
          else:
              count += len(dropped)
      return count
  
imports: from typing import List
  from fontTools.misc.vector import Vector
  from fontTools.misc.roundTools import noRound, otRound
  from fontTools.misc.fixedTools import floatToFixed
  from fontTools.misc.textTools import Tag, tostr
  from fontTools.ttLib import TTFont, newTable
  from fontTools.ttLib.tables._f_v_a_r import Axis, NamedInstance
  from fontTools.ttLib.tables._g_l_y_f import GlyphCoordinates, dropImpliedOnCurvePoints
  from fontTools.ttLib.tables.ttProgram import Program
  from fontTools.ttLib.tables.TupleVariation import TupleVariation
  from fontTools.ttLib.tables import otTables
  from fontTools.ttLib.tables.otBase import OTTableWriter
  from fontTools.varLib import builder, models, varStore
  from fontTools.varLib.merger import VariationMerger, COLRVariationMerger
  from fontTools.varLib.mvar import MVAR_ENTRIES
  from fontTools.varLib.iup import iup_delta_optimize
  from fontTools.varLib.featureVars import addFeatureVariations
  from fontTools.designspaceLib import DesignSpaceDocument, InstanceDescriptor
  from fontTools.designspaceLib.split import splitInterpolable, splitVariableFonts
  from fontTools.varLib.stat import buildVFStatTable
  from fontTools.colorLib.builder import buildColrV1
  from fontTools.colorLib.unbuilder import unbuildColrV1
  from functools import partial
  from collections import OrderedDict, defaultdict, namedtuple
  import os.path
  import logging
  from copy import deepcopy
  from pprint import pformat
  from re import fullmatch
  from .errors import VarLibError, VarLibValidationError
label_desc: Use image node_id 19 for calling a global function with example usage: drop_implied_oncurve_points() and returns: count