code: def _extractFeatureClasses(lookupIndex, subtableIndex, classDefs, coverage=None):
      
      # gather the class members
      classDict = {}
      for glyphName, classIndex in classDefs.items():
          if classIndex not in classDict:
              classDict[classIndex] = set()
          classDict[classIndex].add(glyphName)
      # specially handle class index 0
      revisedClass0 = set()
      if coverage is not None and 0 in classDict:
          for glyphName in classDict[0]:
              if glyphName in coverage:
                  revisedClass0.add(glyphName)
      elif coverage is not None and 0 not in classDict:
          revisedClass0 = set(coverage)
          for glyphList in classDict.values():
              revisedClass0 = revisedClass0 - glyphList
      classDict[0] = revisedClass0
      # flip the class map around
      classes = {}
      for classIndex, glyphList in classDict.items():
          classes[lookupIndex, subtableIndex, classIndex] = frozenset(glyphList)
      return classes
docs: Extract classes for a specific lookup in a specific subtable.
      This is relatively straightforward, except for class 0 interpretation.
      Some fonts don't have class 0. Some fonts have a list of class
      members that are clearly not all to be used in kerning pairs.
      In the case of a missing class 0, the coverage is used as a basis
      for the class and glyph names used in classed 1+ are filtered out.
      In the case of class 0 having glyph names that are not part of the
      kerning pairs, the coverage is used to filter out the unnecessary
      glyph names.