class_docstr: Local Search Attack
  Algorithm 3 in https://arxiv.org/pdf/1612.06299.pdf
  
  :param predict: forward pass function.
  :param clip_min: mininum value per input dimension.
  :param clip_max: maximum value per input dimension.
  :param p: parameter controls pixel complexity
  :param r: perturbation value
  :param loss_fn: loss function
  :param d: the half side length of the neighbourhood square
  :param t: the number of pixels perturbed at each round
  :param k: the threshold for k-misclassification
  :param round_ub: an upper bound on the number of rounds
code: def _rescale_x_score(self, predict, x, y, ori, best_dist):
      x = torch.stack(x)
      x = self._revert_rescale(x)
  
      batch_logits = predict(x)
      scores = nn.Softmax(dim=1)(batch_logits)[:, y]
  
      if not self.comply_with_foolbox:
          x = clamp(x, self.clip_min, self.clip_max)
          batch_logits = predict(x)
  
      _, bests = torch.max(batch_logits, dim=1)
      best_img = None
      for ii in range(len(bests)):
          curr_dist = torch.sum((x[ii] - ori) ** 2)
          if (
              is_successful(int(bests[ii]), y, self.targeted)
              and curr_dist < best_dist
          ):
              best_img = x[ii]
              best_dist = curr_dist
      scores = nn.Softmax(dim=1)(batch_logits)[:, y]
      return scores, best_img, best_dist
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import torch
  import torch.nn
  from advertorch.utils import clamp
  from advertorch.utils import replicate_input
  from .base import Attack
  from .base import LabelMixin
  from .utils import is_successful
label_desc: Use image node_id 9 for calling the LocalSearchAttack obj's underlying member method code with example usage: obj._rescale_x_score(predict, x, y, ori, best_dist) and returns: scores,  best_img,  best_dist