code: def test_rename_axis(setup):
      rs = np.random.RandomState(0)
  
      # test dataframe cases
      raw = pd.DataFrame(rs.rand(10, 4), columns=["A", "B", "C", "D"])
      df = md.DataFrame(raw, chunk_size=3)
  
      r = df.rename_axis("idx")
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.rename_axis("idx")
      )
  
      r = df.rename_axis("cols", axis=1)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.rename_axis("cols", axis=1)
      )
  
      df.rename_axis("c", axis=1, inplace=True)
      pd.testing.assert_frame_equal(
          df.execute().fetch(), raw.rename_axis("c", axis=1)
      )
  
      df.columns.name = "df_cols"
      pd.testing.assert_frame_equal(
          df.execute().fetch(), raw.rename_axis("df_cols", axis=1)
      )
  
      # test dataframe cases with MultiIndex
      raw = pd.DataFrame(
          rs.rand(10, 4),
          columns=pd.MultiIndex.from_tuples(
              [("A", 1), ("B", 2), ("C", 3), ("D", 4)]
          ),
      )
      df = md.DataFrame(raw, chunk_size=3)
  
      df.columns.names = ["c1", "c2"]
      pd.testing.assert_frame_equal(
          df.execute().fetch(), raw.rename_axis(["c1", "c2"], axis=1)
      )
  
      df.columns.set_names("c2_1", level=1, inplace=True)
      pd.testing.assert_frame_equal(
          df.execute().fetch(), raw.rename_axis(["c1", "c2_1"], axis=1)
      )
  
      # test series cases
      raw = pd.Series(rs.rand(10))
      s = md.Series(raw, chunk_size=3)
  
      r = s.rename_axis("idx")
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.rename_axis("idx")
      )
  
      s.index.name = "series_idx"
      pd.testing.assert_series_equal(
          s.execute().fetch(), raw.rename_axis("series_idx")
      )
  
imports: import os
  import tempfile
  import mars
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....utils import pd_release_version
  from ...datasource.read_csv import DataFrameReadCSV
  from ...datasource.read_sql import DataFrameReadSQL
  from ...datasource.read_parquet import DataFrameReadParquet
label_desc: Use image node_id 16 for calling a global function with example usage: test_rename_axis(setup) without return types