code: def test_update_image_classification_sw(
      art_warning, fix_get_mnist_subset, image_dl_estimator
  ):
      try:
          from art.attacks.evasion import ProjectedGradientDescent
  
          classifier, _ = image_dl_estimator(from_logits=False)
  
          swd = SummaryWriterDefault(
              summary_writer=True,
              ind_1=True,
              ind_2=True,
              ind_3=True,
              ind_4=True,
          )
  
          attack = ProjectedGradientDescent(
              estimator=classifier,
              max_iter=10,
              eps=0.3,
              eps_step=0.03,
              batch_size=5,
              verbose=False,
              summary_writer=swd,
          )
  
          (
              x_train_mnist,
              y_train_mnist,
              x_test_mnist,
              y_test_mnist,
          ) = fix_get_mnist_subset
  
          attack.generate(x=x_train_mnist, y=y_train_mnist)
  
          assert all(
              attack.summary_writer.i_1
              == [False, False, False, False, False]
          )
          if np.ndim(attack.summary_writer.i_2) != 0:
              assert len(attack.summary_writer.i_2) == 5
          np.testing.assert_almost_equal(
              attack.summary_writer.i_3["0"],
              np.array([0.0, 0.0, 0.0, 0.0, 0.0]),
          )
          np.testing.assert_almost_equal(
              attack.summary_writer.i_4["0"],
              np.array([0.0, 0.0, 0.0, 0.0, 0.0]),
          )
  
      except ARTTestException as e:
          art_warning(e)
  
file_path: adversarial-robustness-toolbox/tests/test_summary_writer.py
imports: import logging
  import pytest
  import numpy
  from art.summary_writer import SummaryWriterDefault
  from tests.utils import ARTTestException
label_desc: Use image node_id 2 for calling a global function with example usage: test_update_image_classification_sw(art_warning, fix_get_mnist_subset, image_dl_estimator) without return types