def aggregate_roas(rtree):
    """
    remove any supplied prefixes which are superfluous because they are
    already included in another supplied prefix. For example, 203.97.2.0/24
    would be removed if 203.97.0.0/17 was also supplied.
    """
    prefixes = list(rtree.prefixes())
    for prefix in prefixes:
        if not prefix == rtree.search_worst(prefix).prefix:
            rtree.delete(prefix)
    return rtree.prefixes()
