code: def geometric_progression_for_stepsize(
      x, update, dist, decision_function, current_iteration
  ):
      """Geometric progression to search for stepsize.
      Keep decreasing stepsize by half until reaching
      the desired side of the boundary.
      """
      epsilon = dist / np.sqrt(current_iteration)
      while True:
          updated = x + epsilon * update
          success = decision_function(updated)[0]
          if success:
              break
          else:
              epsilon = epsilon / 2.0
  
      return epsilon
  
file_path: cleverhans/cleverhans/torch/attacks/hop_skip_jump_attack.py
imports: import numpy
  import torch
label_desc: Use image node_id 7 for calling a global function with example usage: geometric_progression_for_stepsize(x, update, dist, decision_function, current_iteration) and returns: epsilon