code: def select_delta(dist_post_update, current_iteration,
                   clip_max, clip_min, d, theta, constraint):
    
    if current_iteration == 1:
      delta = 0.1 * (clip_max - clip_min)
    else:
      if constraint == 'l2':
        delta = np.sqrt(d) * theta * dist_post_update
      elif constraint == 'linf':
        delta = d * theta * dist_post_update
  
    return delta
docs: Choose the delta at the scale of distance
     between x and perturbed sample.