def non_dominated_sort(iterable, key=(lambda x: x), allowequality=True):
 items = set(iterable)
 fronts = []
 while items:
  front = non_dominated_front(items, key, allowequality)
  items -= front
  fronts.append(front)
 return fronts

def non_dominated_sort ( iterable , key = ( lambda x : x ) , allowequality = True ) : items = set ( iterable ) fronts = [ ] while items : front = non_dominated_front ( items , key , allowequality ) items -= front fronts . append ( front ) return fronts
return a list that is sorted in a non-dominating fashion .