code: def test_fix_relabel_poison(self):
      (x_train, y_train), (_, _), (_, _) = self.mnist
      x_poison = x_train[:100]
      y_fix = y_train[:100]
  
      test_set_split = 0.7
      n_train = int(len(x_poison) * test_set_split)
      x_test = x_poison[n_train:]
      y_test = y_fix[n_train:]
  
      predictions = np.argmax(self.classifier.predict(x_test), axis=1)
      ini_miss = (
          1
          - np.sum(predictions == np.argmax(y_test, axis=1))
          / y_test.shape[0]
      )
  
      (
          improvement,
          new_classifier,
      ) = ActivationDefence.relabel_poison_ground_truth(
          self.classifier,
          x_poison,
          y_fix,
          test_set_split=test_set_split,
          tolerable_backdoor=0.01,
          max_epochs=5,
          batch_epochs=10,
      )
  
      predictions = np.argmax(new_classifier.predict(x_test), axis=1)
      final_miss = (
          1
          - np.sum(predictions == np.argmax(y_test, axis=1))
          / y_test.shape[0]
      )
  
      self.assertEqual(improvement, ini_miss - final_miss)
  
      # Other method (since it's cross validation we can't assert to a concrete number).
      (
          improvement,
          _,
      ) = ActivationDefence.relabel_poison_cross_validation(
          self.classifier,
          x_poison,
          y_fix,
          n_splits=2,
          tolerable_backdoor=0.01,
          max_epochs=5,
          batch_epochs=10,
      )
      self.assertGreaterEqual(improvement, 0)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  from keras.preprocessing.image import ImageDataGenerator
  import numpy
  from art.data_generators import KerasDataGenerator
  from art.defences.detector.poison import ActivationDefence
  from art.utils import load_mnist
  from art.visualization import convert_to_rgb
  from tests.utils import master_seed
label_desc: Use image node_id 15 for calling the TestActivationDefence obj's underlying member method code with example usage: obj.test_fix_relabel_poison() without return types