docs: def com_google_fonts_check_monospace_max_advancewidth(ttFont, glyph_metrics_stats):
    """Monospace font has hhea.advanceWidthMax equal to each glyph's
    advanceWidth?"""
    from fontbakery.utils import pretty_print_list
  
    seems_monospaced = glyph_metrics_stats["seems_monospaced"]
    if not seems_monospaced:
      yield SKIP, ("Font is not monospaced.")
      return
  
    # hhea:advanceWidthMax is treated as source of truth here.
    max_advw = ttFont['hhea'].advanceWidthMax
    outliers = []
    zero_or_double_width_outliers = []
    glyphSet = ttFont.getGlyphSet().keys() # TODO: remove .keys() when fonttools is updated to 3.27
    glyphs = [
        g for g in glyphSet if g not in ['.notdef', '.null', 'NULL']
    ]
    for glyph_id in glyphs:
      width = ttFont['hmtx'].metrics[glyph_id][0]
      if width != max_advw:
        outliers.append(glyph_id)
      if width == 0 or width == 2 * max_advw:
        zero_or_double_width_outliers.append(glyph_id)
  
    if outliers:
      outliers_percentage = float(len(outliers)) / len(glyphSet)
      yield WARN, Message("should-be-monospaced",
                          "This seems to be a monospaced font,"
                          " so advanceWidth value should be the same"
                          " across all glyphs, but {}% of them"
                          " have a different value: {}"
                          "".format(round(100 * outliers_percentage, 2),
                                    pretty_print_list(outliers)))
      if zero_or_double_width_outliers:
        yield WARN, Message("variable-monospaced",
                            "Double-width and/or zero-width glyphs"
                            " were detected. These glyphs should be set"
                            " to the same width as all others"
                            " and then add GPOS single pos lookups"
                            " that zeros/doubles the widths as needed:"
                            " {}".format(pretty_print_list(
                                           zero_or_double_width_outliers)))
    else:
      yield PASS, ("hhea.advanceWidthMax is equal"
                   " to all glyphs' advanceWidth in this monospaced font.")