r"""
    Args:
        list_ (list):
        priority (list): desired order of items

    Returns:
        list: reordered_list

    CommandLine:
        python -m utool.util_list --test-priority_argsort

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_list import *  # NOQA
        >>> list_ = [2, 4, 6, 8, 10]
        >>> priority = [8, 2, 6, 9]
        >>> reordered_list = priority_sort(list_, priority)
        >>> result = str(reordered_list)
        >>> print(result)
        [8, 2, 6, 4, 10]

def priority_sort(list_, priority):
    r"""
    Args:
        list_ (list):
        priority (list): desired order of items

    Returns:
        list: reordered_list

    CommandLine:
        python -m utool.util_list --test-priority_argsort

    Example:
        >>> # ENABLE_DOCTEST
        >>> from utool.util_list import *  # NOQA
        >>> list_ = [2, 4, 6, 8, 10]
        >>> priority = [8, 2, 6, 9]
        >>> reordered_list = priority_sort(list_, priority)
        >>> result = str(reordered_list)
        >>> print(result)
        [8, 2, 6, 4, 10]
    """
    # remove requested priority items not in the list
    priority_ = setintersect_ordered(priority, list_)
    reordered_list = unique_ordered(priority_ + list_)
    return reordered_list