def sort_lists(sorted_indices, list_to_sort):
    """
    given a list of indices and a list to sort sort the list using the sorted_indices order
    :param sorted_indices: a list of indices in the order they should be e.g. [0,4,2,3]
    :param list_to_sort: the list which needs to be sorted in the indice order from sorted_indices
    :return: sorted list
    """
    return [list_to_sort[i] for i in sorted_indices]