code: def test_spatial_attacks(
      fmodel_and_data_ext_for_attacks: ModeAndDataAndDescription,
      attack_grad_real: Tuple[fbn.Attack, bool],
  ) -> None:
      attack, repeated = attack_grad_real
      if repeated:
          attack = attack.repeat(2)
      (fmodel, x, y), real, _ = fmodel_and_data_ext_for_attacks
      if not real:
          pytest.skip()
  
      x = (x - fmodel.bounds.lower) / (
          fmodel.bounds.upper - fmodel.bounds.lower
      )
      fmodel = fmodel.transform_bounds((0, 1))
      acc = fbn.accuracy(fmodel, x, y)
      assert acc > 0
      advs, _, _ = attack(fmodel, x, y)  # type: ignore
      assert fbn.accuracy(fmodel, advs, y) < acc
  
imports: from typing import List, Tuple
  import pytest
  import foolbox
  import foolbox.attacks
  from conftest import ModeAndDataAndDescription
label_desc: Use image node_id 2 for calling a global function with example usage: test_spatial_attacks(fmodel_and_data_ext_for_attacks, attack_grad_real) without return types