def sorted_minima(xs, ys, zs):
    points = zip(xs, ys, zs)
    unique_points = set(points)
    minimum_points = []
    for new_point in unique_points:
        for old_index, old_point in enumerate(minimum_points):
            if old_point[:2] == new_point[:2]:
                if new_point[2] < old_point[2]:
                    minimum_points[old_index] = new_point
                break
        else:
            minimum_points.append(new_point)
    sorted_minimum_points = sorted(minimum_points)
    xs, ys, zs = zip(*sorted_minimum_points)
    return xs, ys, zs
dataset/ETHPy150Open jvanbrug/netflix/scripts/graph_rmse.py/sorted_minima/original