def METHOD_NAME(self, tags):
    # type: (Iterable[Tag]) -> Optional[RankedTag]
    METHOD_NAME = None  # type: Optional[RankedTag]
    for tag in tags:
        rank = self.rank(tag)
        if rank is None:
            continue
        ranked_tag = RankedTag(tag=tag, rank=rank)
        if METHOD_NAME is None or ranked_tag is METHOD_NAME.select_higher_rank(ranked_tag):
            METHOD_NAME = ranked_tag
    return METHOD_NAME