code: def test_fit_predict(
      art_warning, image_dl_estimator, fix_get_mnist_subset
  ):
      classifier, _ = image_dl_estimator()
  
      (x_train, y_train, x_test, y_test) = fix_get_mnist_subset
      x_test_original = x_test.copy()
  
      adv_trainer = AdversarialTrainerMadryPGD(
          classifier, nb_epochs=1, batch_size=128
      )
      adv_trainer.fit(x_train, y_train)
  
      predictions_new = np.argmax(
          adv_trainer.trainer.get_classifier().predict(x_test), axis=1
      )
      accuracy_new = np.mean(
          predictions_new == np.argmax(y_test, axis=1)
      )
  
      assert accuracy_new == pytest.approx(0.375, abs=0.05)
      # Check that x_test has not been modified by attack and classifier
      assert np.allclose(x_test_original, x_test)
  
file_path: adversarial-robustness-toolbox/tests/defences/trainer/test_adversarial_trainer_madry_pgd.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from art.defences.trainer.adversarial_trainer_madry_pgd import AdversarialTrainerMadryPGD
label_desc: Use image node_id 2 for calling a global function with example usage: test_fit_predict(art_warning, image_dl_estimator, fix_get_mnist_subset) without return types