class_docstr: Implementation of Hidden Trigger Backdoor Attack by Saha et al 2019.
  "Hidden Trigger Backdoor Attacks
  
  | Paper link: https://arxiv.org/abs/1910.00033
class_docstr_tok: ["Implementation","of","Hidden","Trigger","Backdoor","Attack","by","Saha","et","al","2019",".","``","Hidden","Trigger","Backdoor","Attacks","|","Paper","link",":","https",":","\/\/arxiv.org\/abs\/1910.00033"]
docstr: Calls perturbation function on the dataset x and returns only the perturbed inputs and their
  indices in the dataset.
  
  :param x: An array in the shape NxCxWxH with the points to draw source and target samples from.
            Source indicates the class(es) that the backdoor would be added to to cause
            misclassification into the target label.
            Target indicates the class that the backdoor should cause misclassification into.
  :param y: The labels of the provided samples. If none, we will use the classifier to label the
            data.
  :return: An tuple holding the `(poisoning_examples, poisoning_labels)`.
docstr_tok: ["Calls","perturbation","function","on","the","dataset","x","and","returns","only","the","perturbed","inputs","and","their","indices","in","the","dataset",".",":","param","x",":","An","array","in","the","shape","NxCxWxH","with","the","points","to","draw","source","and","target","samples","from",".","Source","indicates","the","class","(","es",")","that","the","backdoor","would","be","added","to","to","cause","misclassification","into","the","target","label",".","Target","indicates","the","class","that","the","backdoor","should","cause","misclassification","into",".",":","param","y",":","The","labels","of","the","provided","samples",".","If","none",",","we","will","use","the","classifier","to","label","the","data",".",":","return",":","An","tuple","holding","the","`","(","poisoning_examples",",","poisoning_labels",")","`","."]
code: def poison(  # pylint: disable=W0221
      self, x: np.ndarray, y: Optional[np.ndarray] = None, **kwargs
  ) -> Tuple[np.ndarray, np.ndarray]:
      """
      Calls perturbation function on the dataset x and returns only the perturbed inputs and their
      indices in the dataset.
  
      :param x: An array in the shape NxCxWxH with the points to draw source and target samples from.
                Source indicates the class(es) that the backdoor would be added to to cause
                misclassification into the target label.
                Target indicates the class that the backdoor should cause misclassification into.
      :param y: The labels of the provided samples. If none, we will use the classifier to label the
                data.
      :return: An tuple holding the `(poisoning_examples, poisoning_labels)`.
      """
  
      return self._attack.poison(x, y, **kwargs)
  
file_path: adversarial-robustness-toolbox/art/attacks/poisoning/hidden_trigger_backdoor/hidden_trigger_backdoor.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import List, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
  from art.attacks.attack import PoisoningAttackWhiteBox
  from art.attacks.poisoning.backdoor_attack import PoisoningAttackBackdoor
  from art.estimators import BaseEstimator, NeuralNetworkMixin
  from art.estimators.classification.classifier import ClassifierMixin
  from art.estimators.classification.pytorch import PyTorchClassifier
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.classification.tensorflow import TensorFlowV2Classifier
  from art.attacks.poisoning.hidden_trigger_backdoor.hidden_trigger_backdoor_pytorch import HiddenTriggerBackdoorPyTorch
  from art.attacks.poisoning.hidden_trigger_backdoor.hidden_trigger_backdoor_keras import HiddenTriggerBackdoorKeras
label_desc: Use image node_id 2 for calling the HiddenTriggerBackdoor obj's underlying member method code with example usage: obj.poison(x, y) and returns: self