code: def test_swapaxes_invalid_axis(self):
      df = DataFrame(np.random.default_rng(2).standard_normal((10, 5)))
      msg = "'DataFrame.swapaxes' is deprecated"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          msg = "No axis named 2 for object type DataFrame"
          with pytest.raises(ValueError, match=msg):
              df.swapaxes(2, 5)
  
file_path: pandas/pandas/tests/frame/methods/test_swapaxes.py
imports: import numpy
  import pytest
  from pandas import DataFrame
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestSwapAxes obj's underlying member method code with example usage: obj.test_swapaxes_invalid_axis() without return types