code: def _perturb_batch(perturb_single, x, y):
      for ii in range(len(x)):
          temp = perturb_single(x[ii], y[ii])[None, :, :, :]
          if ii == 0:
              result = temp
          else:
              result = torch.cat((result, temp))
      return result
  
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 1 for calling a global function with example usage: _perturb_batch(perturb_single, x, y) and returns: result