code: def test_iterative_saliency(
      art_warning, fix_get_mnist_subset, image_dl_estimator_for_attack
  ):
      try:
          classifier = image_dl_estimator_for_attack(FastGradientMethod)
  
          expected_values_axis_1 = {
              "nb_perturbed_frames": ExpectedValue(
                  np.asarray([10, 1, 2, 12, 16, 1, 2, 7, 4, 11, 5]), 2
              )
          }
  
          expected_values_axis_2 = {
              "nb_perturbed_frames": ExpectedValue(
                  np.asarray([11, 1, 2, 6, 14, 2, 2, 13, 4, 8, 4]), 2
              )
          }
  
          attacker = FastGradientMethod(
              classifier, eps=0.3, batch_size=128
          )
          attack = FrameSaliencyAttack(
              classifier, attacker, "iterative_saliency"
          )
          backend_check_adverse_frames(
              attack, fix_get_mnist_subset, expected_values_axis_1
          )
  
          # test with non-default frame index:
          attack = FrameSaliencyAttack(
              classifier, attacker, "iterative_saliency", frame_index=2
          )
          backend_check_adverse_frames(
              attack, fix_get_mnist_subset, expected_values_axis_2
          )
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/attacks/evasion/test_frame_saliency.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import numpy
  import pytest
  from art.attacks.evasion import FastGradientMethod, FrameSaliencyAttack
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from tests.utils import ExpectedValue
  from tests.attacks.utils import backend_check_adverse_values, backend_check_adverse_frames
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import ARTTestException
label_desc: Use image node_id 3 for calling a global function with example usage: test_iterative_saliency(art_warning, fix_get_mnist_subset, image_dl_estimator_for_attack) without return types