def _best_rank(prop, ranking_map):
    """Return the best ranking value for the specified property.

    This function collects ranking values for not only the property's real name
    but also its aliases, and returns the best (lower is better) value.
    If no ranking values for the property is available, this returns -1.
    """
    worst_rank = max(ranking_map.values()) + 1
    best_rank = ranking_map.get(prop["name"].original, worst_rank)

    for alias_name in prop.get("aliases", []):
        best_rank = min(best_rank, ranking_map.get(alias_name, worst_rank))
    return best_rank if best_rank != worst_rank else -1