class_docstr: A factory for an expression that runs an adversarial attack
  
  :param model: cleverhans.model.Model
  :param attack: cleverhans.attack.Attack
  :param attack_params: dict of arguments to pass to attack.generate
  :param pass_y: bool. If True, pass y to the attack.
    (Some untargeted attacks prefer to infer y to avoid label leaking.
    Targeted attacks require that y not be passed)
code: def __init__(self, model, attack, attack_params=None, pass_y=False):
      assert isinstance(model, cleverhans.model.Model)
      if not isinstance(attack, cleverhans.attacks.Attack):
          raise TypeError(
              "`attack` must be an instance of cleverhans.attacks."
              "attack. Got %s with type %s "
              % (str(attack), str(type(attack)))
          )
  
      if attack_params is None:
          attack_params = {}
      self.model = model
      self.attack = attack
      self.attack_params = attack_params
      self.pass_y = pass_y
      hashable_attack_params = tuple(
          (key, attack_params[key])
          for key in sorted(attack_params.keys())
      )
      self.properties_to_hash = (model, attack, hashable_attack_params)
  
imports: from distutils.version import LooseVersion
  import warnings
  import numpy
  from six.moves import range
  import tensorflow
  import cleverhans
  from cleverhans import canary
  from cleverhans.utils import create_logger
  from cleverhans.utils_tf import infer_devices
label_desc: Use image node_id 1 to create a new _AttackFactory object from inherited base classes: object with example: obj = _AttackFactory(model, attack, attack_params, pass_y)