def METHOD_NAME(families, family2):
    """ Returns a match score between the list of font families in
    *families* and the font family name *family2*.
    An exact match anywhere in the list returns 0.0.
    A match by generic font name will return 0.1.
    No match will return 1.0.
    """
    family2 = family2.lower()
    for i, family1 in enumerate(families):
        family1 = family1.lower()
        if family1 in font_family_aliases:
            if family1 in {"sans", "sans serif"}:
                family1 = "sans-serif"
            options = preferred_fonts[family1]
            options = [x.lower() for x in options]
            if family2 in options:
                idx = options.index(family2)
                return 0.1 * (float(idx) / len(options))
        elif family1 == family2:
            return 0.0
    return 1.0