def StyleWeight(styleweight):
  if styleweight.endswith('Italic'):
    return ('italic', _KNOWN_WEIGHTS[styleweight[:-6]])

  return ('normal', _KNOWN_WEIGHTS[styleweight])
Breaks apart a style/weight specifier into a 2-tuple of (style, weight).
dataset/ETHPy150Open googlefonts/fontbakery/tools/fontbakery-build-fontmetadata.py/StyleWeight