def _is_sub_partition(sets, other_sets):
    """
    Checks if all the sets in one list are subsets of one set in another list.
    Used by get_ranked_trajectory_partitions

    Parameters
    ----------
    sets : list of python sets
        partition to check
    other_sets : list of python sets
        partition to check against

    Returns
    -------
    bool
        whether all sets are included in other_sets
    """
    for set_ in sets:
        if not any(map(set_.issubset, other_sets)):
            #here if at least one set is not fully included in another set in the other partition
            return False
    return True