def generate_phase_list(phase_list):
    """Generate all possible unique lists of given phases"""
    # base case: only one setting left
    if len(phase_list) == 1:
        return [phase_list]

    all_phase_lists = list()

    for phase in phase_list:
        new_list = phase_list.copy()
        new_list.remove(phase)
        sublists = generate_phase_list(new_list)
        for sub in sublists:
            sub.append(phase)
            all_phase_lists.append(sub)
    return all_phase_lists