def choose_entries(plot_defs, new_order):
    """Choose the entries in the plot definitions

    Args:
        plot_defs: list of plot definitions
        new_order: list of indices that define the new order of the entries. Indices may appear
                   multiple times and may appear not at all.
    Returns:
        list of plot definitions with only the chosen entries in the given order
    """
    new_plot_defs = []
    for plot_def in plot_defs:
        new_plot_defs.append(plot_def._replace(entries=[plot_def.entries[i] for i in new_order]))
    return new_plot_defs