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 _random_sample_seeds(
      self, h, w, seed_ratio, max_nb_seeds, init_rand
  ):
      n = int(seed_ratio * h * w)
      n = min(n, max_nb_seeds)
      if init_rand is not None:
          locations = torch.from_numpy(init_rand)[:n]
      else:
          locations = torch.randperm(h * w)[:n]
      p_x = locations.int() % w
      p_y = locations.int() / w
      pxy = list(zip(p_x, p_y))
      pxy = torch.Tensor(pxy)
      return pxy
  
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 6 for calling the LocalSearchAttack obj's underlying member method code with example usage: obj._random_sample_seeds(h, w, seed_ratio, max_nb_seeds, init_rand) and returns: pxy