def find_best_label_for_type(labels, language, labeltype):
typelabels = [l for l in labels if l.type == labeltype]<EOL>if not typelabels:<EOL><INDENT>return False<EOL><DEDENT>if language == '<STR_LIT>':<EOL><INDENT>return typelabels[<NUM_LIT:0>]<EOL><DEDENT>exact = filter_labels_by_language(typelabels, language)<EOL>if exact:<EOL><INDENT>return exact[<NUM_LIT:0>]<EOL><DEDENT>inexact = filter_labels_by_language(typelabels, language, True)<EOL>if inexact:<EOL><INDENT>return inexact[<NUM_LIT:0>]<EOL><DEDENT>return False<EOL>
Find the best label for a certain labeltype.

:param list labels: A list of :class:`Label`.
:param str language: An IANA language string, eg. `nl` or `nl-BE`.
:param str labeltype: Type of label to look for, eg. `prefLabel`.