code: def main(args):
      """Report font glyph shape geometricsl statistics"""
  
      if args is None:
          import sys
  
          args = sys.argv[1:]
  
      import argparse
  
      parser = argparse.ArgumentParser(
          "fonttools pens.statisticsPen",
          description="Report font glyph shape geometricsl statistics",
      )
      parser.add_argument("font", metavar="font.ttf", help="Font file.")
      parser.add_argument(
          "glyphs", metavar="glyph-name", help="Glyph names.", nargs="*"
      )
      parser.add_argument(
          "-y",
          metavar="<number>",
          help="Face index into a collection to open. Zero based.",
      )
      parser.add_argument(
          "-c",
          "--control",
          action="store_true",
          help="Use the control-box pen instead of the Green therem.",
      )
      parser.add_argument(
          "-q",
          "--quiet",
          action="store_true",
          help="Only report font-wide statistics.",
      )
      parser.add_argument(
          "--variations",
          metavar="AXIS=LOC",
          default="",
          help="List of space separated locations. A location consist in "
          "the name of a variation axis, followed by '=' and a number. E.g.: "
          "wght=700 wdth=80. The default is the location of the base master.",
      )
  
      options = parser.parse_args(args)
  
      glyphs = options.glyphs
      fontNumber = int(options.y) if options.y is not None else 0
  
      location = {}
      for tag_v in options.variations.split():
          fields = tag_v.split("=")
          tag = fields[0].strip()
          v = int(fields[1])
          location[tag] = v
  
      from fontTools.ttLib import TTFont
  
      font = TTFont(options.font, fontNumber=fontNumber)
      if not glyphs:
          glyphs = font.getGlyphOrder()
      _test(
          font.getGlyphSet(location=location),
          font["head"].unitsPerEm,
          glyphs,
          quiet=options.quiet,
          control=options.control,
      )
  
imports: from math import sqrt, degrees, atan
  from fontTools.pens.basePen import BasePen, OpenContourError
  from fontTools.pens.momentsPen import MomentsPen
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types