code: def test_rename_axis_raises(self):
      # GH#17833
      df = DataFrame({"A": [1, 2], "B": [1, 2]})
      with pytest.raises(ValueError, match="Use `.rename`"):
          df.rename_axis(id, axis=0)
  
      with pytest.raises(ValueError, match="Use `.rename`"):
          df.rename_axis({0: 10, 1: 20}, axis=0)
  
      with pytest.raises(ValueError, match="Use `.rename`"):
          df.rename_axis(id, axis=1)
  
      with pytest.raises(ValueError, match="Use `.rename`"):
          df["A"].rename_axis(id)
  
file_path: pandas/pandas/tests/frame/methods/test_rename_axis.py
imports: import numpy
  import pytest
  from pandas import DataFrame, Index, MultiIndex
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestDataFrameRenameAxis obj's underlying member method code with example usage: obj.test_rename_axis_raises() without return types