'Return a function that is used to generate a key that can sort Metadata
objects by their relevance given a search query (title, authors,
identifiers).
These keys are used to sort the results of a call to :meth:`identify`.
For details on the default algorithm see
:class:`InternalMetadataCompareKeyGen`. Re-implement this function in
your plugin if the default algorithm is not suitable.'

def identify_results_keygen(self, title=None, authors=None, identifiers={}):

    def keygen(mi):
        return InternalMetadataCompareKeyGen(mi, self, title, authors, identifiers)
    return keygen
