code: def initialize(decision_function, sample, shape, clip_min, clip_max):
      """
      Efficient Implementation of BlendedUniformNoiseAttack in Foolbox.
      """
      success = 0
      num_evals = 0
  
      # Find a misclassified random noise.
      while True:
          random_noise = clip_min + torch.rand(shape).to(
              sample.device
          ) * (clip_max - clip_min)
          success = decision_function(random_noise)[0]
          if success:
              break
          num_evals += 1
          message = "Initialization failed! Try to use a misclassified image as `target_image`"
          assert num_evals < 1e4, message
  
      # Binary search to minimize l2 distance to original image.
      low = 0.0
      high = 1.0
      while high - low > 0.001:
          mid = (high + low) / 2.0
          blended = (1 - mid) * sample + mid * random_noise
          success = decision_function(blended)[0]
          if success:
              high = mid
          else:
              low = mid
  
      initialization = (1 - high) * sample + high * random_noise
      return initialization
  
file_path: cleverhans/cleverhans/torch/attacks/hop_skip_jump_attack.py
imports: import numpy
  import torch
label_desc: Use image node_id 6 for calling a global function with example usage: initialize(decision_function, sample, shape, clip_min, clip_max) and returns: initialization