human
I wrote the below code

    def score(searcher, docnum):
        doc = searcher.stored_fields(docnum)
        weight = extra_weights.get(doc['name'], 1.0)
        doc_language = doc['language']
        if (doc_language == locale_ident):
            weight *= 2.0
        elif (doc_language == u'roomaji'):
            weight *= 1.4
        return (- weight)
    return whoosh.sorting.FunctionFacet(score)

What's a good function header?
assistant
#Here's a good function header.

def LanguageFacet(locale_ident, extra_weights={}):