code: def update_pareto_set(vals, points, new_val, new_point):
      """Updates the current pareto optimal values and points with the
      new value and new point. vals is assummed to be a non-dominated
      set. The returned updated vals and points is guaranteed to
      be non-dominated provided the original values were
      non-dominated.
      """
      num_points = len(points)
      new_vals = []
      new_points = []
      for i in range(num_points):
          # If new_val does not dominate vals[i], keep it
          if not pareto_dominates(new_val, vals[i]):
              new_vals.append(vals[i])
              new_points.append(points[i])
      # Check if new_vals is not dominated by any vals[i].
      # If so, then keep it.
      dominated = False
      for i in range(num_points):
          if pareto_dominates(vals[i], new_val):
              dominated = True
              break
      if not dominated:
          new_points.append(new_point)
          new_vals.append(new_val)
      return new_vals, new_points
  
imports: from __future__ import print_function
  from __future__ import division
  import numpy
  from scipy.sparse import dok_matrix
  from scipy.linalg import solve_triangular
label_desc: Use image node_id 10 for calling a global function with example usage: update_pareto_set(vals, points, new_val, new_point) and returns: new_vals,  new_points