class_docstr: A unittest class for testing Backdoor Poisoning attack.
code: def poison_dataset(x_clean, y_clean, poison_func):
      x_poison = np.copy(x_clean)
      y_poison = np.copy(y_clean)
      is_poison = np.zeros(np.shape(y_poison)[0])
  
      for i in range(10):
          src = i
          tgt = (i + 1) % 10
          n_points_in_tgt = np.round(
              np.sum(np.argmax(y_clean, axis=1) == tgt)
          )
          num_poison = int(
              (PP_POISON * n_points_in_tgt) / (1 - PP_POISON)
          )
          src_imgs = np.copy(x_clean[np.argmax(y_clean, axis=1) == src])
  
          n_points_in_src = np.shape(src_imgs)[0]
          if num_poison:
              indices_to_be_poisoned = np.random.choice(
                  n_points_in_src, num_poison
              )
  
              imgs_to_be_poisoned = src_imgs[indices_to_be_poisoned]
              backdoor_attack = PoisoningAttackBackdoor(poison_func)
              poison_images, poison_labels = backdoor_attack.poison(
                  imgs_to_be_poisoned,
                  y=to_categorical(np.ones(num_poison) * tgt, 10),
              )
              x_poison = np.append(x_poison, poison_images, axis=0)
              y_poison = np.append(y_poison, poison_labels, axis=0)
              is_poison = np.append(is_poison, np.ones(num_poison))
  
      is_poison = is_poison != 0
  
      return is_poison, x_poison, y_poison
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import os
  import logging
  import unittest
  import numpy
  from art.attacks.poisoning.backdoor_attack import PoisoningAttackBackdoor
  from art.attacks.poisoning.perturbations import add_pattern_bd, add_single_bd, insert_image
  from art.utils import to_categorical
  from tests.utils import TestBase, master_seed, get_image_classifier_kr
label_desc: Use image node_id 2 for calling the TestBackdoorAttack obj's underlying member method code with example usage: obj.poison_dataset(x_clean, y_clean, poison_func) and returns: is_poison,  x_poison,  y_poison