code: def test_randomized_smoothing_mnist_fgsm(
      art_warning, get_default_mnist_subset, get_mnist_classifier
  ):
      (_, _), (x_test, y_test) = get_default_mnist_subset
      x_test, y_test = x_test[:10], y_test[:10]
  
      try:
          classifier, rs = get_mnist_classifier()
          fgsm = FastGradientMethod(estimator=classifier, targeted=True)
          params = {"y": random_targets(y_test, classifier.nb_classes)}
          x_test_adv = fgsm.generate(x_test, **params)
  
          fgsm_with_rs = FastGradientMethod(estimator=rs, targeted=True)
          x_test_adv_with_rs = fgsm_with_rs.generate(x_test, **params)
  
          np.testing.assert_array_equal(
              x_test_adv.shape, x_test_adv_with_rs.shape
          )
          np.testing.assert_array_less(
              np.abs(x_test_adv - x_test_adv_with_rs), 0.75
          )
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/estimators/certification/test_randomized_smoothing.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import pytest
  import numpy
  from art.attacks.evasion.fast_gradient import FastGradientMethod
  from art.estimators.certification.randomized_smoothing import NumpyRandomizedSmoothing, TensorFlowV2RandomizedSmoothing, PyTorchRandomizedSmoothing
  from art.utils import load_dataset, random_targets
  from tests.utils import get_image_classifier_pt, get_image_classifier_tf, get_image_classifier_kr, get_tabular_classifier_pt, ARTTestException
label_desc: Use image node_id 7 for calling a global function with example usage: test_randomized_smoothing_mnist_fgsm(art_warning, get_default_mnist_subset, get_mnist_classifier) without return types