code: def test_hsj_untargeted_attack(
      request: Any,
      fmodel_and_data_ext_for_attacks: ModeAndDataAndDescription,
      attack_and_p: Tuple[fa.HopSkipJumpAttack, Union[int, float]],
  ) -> None:
      if request.config.option.skipslow:
          pytest.skip()
  
      (
          (fmodel, x, y),
          real,
          low_dimensional_input,
      ) = fmodel_and_data_ext_for_attacks
  
      if isinstance(x, ep.NumPyTensor):
          pytest.skip()
      if low_dimensional_input:
          pytest.skip()
  
      x = (x - fmodel.bounds.lower) / (
          fmodel.bounds.upper - fmodel.bounds.lower
      )
      fmodel = fmodel.transform_bounds((0, 1))
  
      init_attack = fa.DatasetAttack()
      init_attack.feed(fmodel, x)
      init_advs = init_attack.run(fmodel, x, y)
  
      attack, p = attack_and_p
      advs = attack.run(fmodel, x, y, starting_points=init_advs)
  
      init_norms = ep.norms.lp(flatten(init_advs - x), p=p, axis=-1)
      norms = ep.norms.lp(flatten(advs - x), p=p, axis=-1)
  
      is_smaller = norms < init_norms
  
      assert fbn.accuracy(fmodel, advs, y) < fbn.accuracy(fmodel, x, y)
      assert fbn.accuracy(fmodel, advs, y) <= fbn.accuracy(
          fmodel, init_advs, y
      )
      assert is_smaller.any()
  
file_path: foolbox/tests/test_hsj_attack.py
imports: from typing import Tuple, Union, List, Any
  import eagerpy
  import foolbox
  import foolbox.attacks
  from foolbox.devutils import flatten
  from foolbox.attacks.brendel_bethge import BrendelBethgeAttack
  import pytest
  from conftest import ModeAndDataAndDescription
label_desc: Use image node_id 2 for calling a global function with example usage: test_hsj_untargeted_attack(request, fmodel_and_data_ext_for_attacks, attack_and_p) without return types