docs: def com_google_fonts_check_metadata_match_weight_postscript(font_metadata):
    """METADATA.pb weight matches postScriptName."""
    WEIGHTS = {
      "Thin": 100,
      "ThinItalic": 100,
      "ExtraLight": 200,
      "ExtraLightItalic": 200,
      "Light": 300,
      "LightItalic": 300,
      "Regular": 400,
      "Italic": 400,
      "Medium": 500,
      "MediumItalic": 500,
      "SemiBold": 600,
      "SemiBoldItalic": 600,
      "Bold": 700,
      "BoldItalic": 700,
      "ExtraBold": 800,
      "ExtraBoldItalic": 800,
      "Black": 900,
      "BlackItalic": 900
    }
    pair = []
    for k, weight in WEIGHTS.items():
      if weight == font_metadata.weight:
        pair.append((k, weight))
  
    if not pair:
      yield FAIL, ("METADATA.pb: Font weight value ({})"
                   " is invalid.").format(font_metadata.weight)
    elif not (font_metadata.post_script_name.endswith('-' + pair[0][0]) or
              font_metadata.post_script_name.endswith('-' + pair[1][0])):
      yield FAIL, ("METADATA.pb: Mismatch between postScriptName (\"{}\")"
                   " and weight value ({}). The name must be"
                   " ended with \"{}\" or \"{}\"."
                   "").format(font_metadata.post_script_name,
                              pair[0][1],
                              pair[0][0],
                              pair[1][0])
    else:
      yield PASS, "Weight value matches postScriptName."