def _non_dominated_front_merge(iterable, key=lambda x: x, allowequality=True):
    items = list(iterable)
    l = len(items)
    if l > 20:
        part1 = list(_non_dominated_front_merge(items[:l // 2], key, allowequality))
        part2 = list(_non_dominated_front_merge(items[l // 2:], key, allowequality))
        if len(part1) >= l // 3 or len(part2) >= l // 3:
            return _non_dominated_front_fast(part1 + part2, key, allowequality)
        else:
            return _non_dominated_front_merge(part1 + part2, key, allowequality)
    else:
        return _non_dominated_front_fast(items, key, allowequality)
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/nondominated.py/_non_dominated_front_merge/original