code: def test_get_channel_axis() -> None:
      class Model:
          data_format = None
  
      model = Model()
      model.data_format = "channels_first"  # type: ignore
      assert fbn.attacks.base.get_channel_axis(model, 3) == 1  # type: ignore
      model.data_format = "channels_last"  # type: ignore
      assert fbn.attacks.base.get_channel_axis(model, 3) == 2  # type: ignore
      model.data_format = "invalid"  # type: ignore
      with pytest.raises(ValueError):
          assert fbn.attacks.base.get_channel_axis(model, 3)
  
imports: import pytest
  import eagerpy
  import foolbox
  from conftest import ModeAndDataAndDescription
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_channel_axis() without return types