def METHOD_NAME(font):
  familyName = getFamilyName(font)
  # collect subfamily (style) name IDs for variable font's named instances
  vfInstanceSubfamilyNameIds = set()
  if "fvar" in font:
    for namedInstance in font["fvar"].instances:
      vfInstanceSubfamilyNameIds.add(namedInstance.subfamilyNameID)
  nameTable = font["name"]
  for rec in nameTable.names:
    rid = rec.nameID
    if rid in (FULL_NAME, LEGACY_FAMILY):
      # style part of family name
      s = rec.toUnicode()
      start = s.find(familyName)
      if start != -1:
        s = familyName + " " + removeWhitespace(s[start + len(familyName):])
      else:
        s = removeWhitespace(s)
      rec.string = s
    if rid in (SUBFAMILY_NAME,) or rid in vfInstanceSubfamilyNameIds:
      rec.string = removeWhitespace(rec.toUnicode())
    # else: ignore standard names unrelated to style