def sort_query_ids_numerically(ids):
    """
    Returns query ids in the format "R1_10" sorted
    ascending by the numerical part of the id
    (1 in this example).
    """
    return sorted(
        ids, key=lambda x: int(x.split("_")[0].lstrip("R")))