code: def test_reset_index_execution(setup):
      data = pd.DataFrame(
          [
              ("bird", 389.0),
              ("bird", 24.0),
              ("mammal", 80.5),
              ("mammal", np.nan),
          ],
          index=["falcon", "parrot", "lion", "monkey"],
          columns=("class", "max_speed"),
      )
      df = md.DataFrame(data)
      df2 = df.reset_index()
      result = df2.execute().fetch()
      expected = data.reset_index()
      pd.testing.assert_frame_equal(result, expected)
  
      df = md.DataFrame(data, chunk_size=2)
      df2 = df.reset_index()
      result = df2.execute().fetch()
      expected = data.reset_index()
      pd.testing.assert_frame_equal(result, expected)
  
      df = md.DataFrame(data, chunk_size=1)
      df2 = df.reset_index(drop=True)
      result = df2.execute().fetch()
      expected = data.reset_index(drop=True)
      pd.testing.assert_frame_equal(result, expected)
  
      index = pd.MultiIndex.from_tuples(
          [
              ("bird", "falcon"),
              ("bird", "parrot"),
              ("mammal", "lion"),
              ("mammal", "monkey"),
          ],
          names=["class", "name"],
      )
      data = pd.DataFrame(
          [
              ("bird", 389.0),
              ("bird", 24.0),
              ("mammal", 80.5),
              ("mammal", np.nan),
          ],
          index=index,
          columns=("type", "max_speed"),
      )
      df = md.DataFrame(data, chunk_size=1)
      df2 = df.reset_index(level="class")
      result = df2.execute().fetch()
      expected = data.reset_index(level="class")
      pd.testing.assert_frame_equal(result, expected)
  
      columns = pd.MultiIndex.from_tuples(
          [("speed", "max"), ("species", "type")]
      )
      data.columns = columns
      df = md.DataFrame(data, chunk_size=2)
      df2 = df.reset_index(
          level="class", col_level=1, col_fill="species"
      )
      result = df2.execute().fetch()
      expected = data.reset_index(
          level="class", col_level=1, col_fill="species"
      )
      pd.testing.assert_frame_equal(result, expected)
  
      df = md.DataFrame(data, chunk_size=3)
      df.reset_index(
          level="class", col_level=1, col_fill="species", inplace=True
      )
      result = df.execute().fetch()
      expected = data.reset_index(
          level="class", col_level=1, col_fill="species"
      )
      pd.testing.assert_frame_equal(result, expected)
  
      # Test Series
  
      s = pd.Series(
          [1, 2, 3, 4],
          name="foo",
          index=pd.Index(["a", "b", "c", "d"], name="idx"),
      )
  
      series = md.Series(s)
      s2 = series.reset_index(name="bar")
      result = s2.execute().fetch()
      expected = s.reset_index(name="bar")
      pd.testing.assert_frame_equal(result, expected)
  
      series = md.Series(s, chunk_size=2)
      s2 = series.reset_index(drop=True)
      result = s2.execute().fetch()
      expected = s.reset_index(drop=True)
      pd.testing.assert_series_equal(result, expected)
  
      # Test Unknown shape
      data1 = pd.DataFrame(
          np.random.rand(10, 3), index=[0, 10, 2, 3, 4, 5, 6, 7, 8, 9]
      )
      df1 = md.DataFrame(data1, chunk_size=5)
      data2 = pd.DataFrame(
          np.random.rand(10, 3), index=[11, 1, 2, 5, 7, 6, 8, 9, 10, 3]
      )
      df2 = md.DataFrame(data2, chunk_size=6)
      df = (df1 + df2).reset_index(incremental_index=True)
      result = df.execute().fetch()
      pd.testing.assert_index_equal(result.index, pd.RangeIndex(12))
      # Inconsistent with Pandas when input dataframe's shape is unknown.
      result = result.sort_values(by=result.columns[0])
      expected = (data1 + data2).reset_index()
      np.testing.assert_array_equal(
          result.to_numpy(), expected.to_numpy()
      )
  
      data1 = pd.Series(
          np.random.rand(10),
          index=[0, 10, 2, 3, 4, 5, 6, 7, 8, 9],
      )
      series1 = md.Series(data1, chunk_size=3)
      data2 = pd.Series(
          np.random.rand(10),
          index=[11, 1, 2, 5, 7, 6, 8, 9, 10, 3],
      )
      series2 = md.Series(data2, chunk_size=3)
      df = (series1 + series2).reset_index(incremental_index=True)
      result = df.execute().fetch()
      pd.testing.assert_index_equal(result.index, pd.RangeIndex(12))
      # Inconsistent with Pandas when input dataframe's shape is unknown.
      result = result.sort_values(by=result.columns[0])
      expected = (data1 + data2).reset_index()
      np.testing.assert_array_equal(
          result.to_numpy(), expected.to_numpy()
      )
  
      series1 = md.Series(data1, chunk_size=3)
      series1.reset_index(inplace=True, drop=True)
      result = series1.execute().fetch()
      pd.testing.assert_index_equal(result.index, pd.RangeIndex(10))
  
      # case from https://github.com/mars-project/mars/issues/1286
      data = pd.DataFrame(np.random.rand(10, 3), columns=list("abc"))
      df = md.DataFrame(data, chunk_size=3)
  
      r = df.sort_values("a").reset_index(
          drop=True, incremental_index=True
      )
      result = r.execute().fetch()
      expected = data.sort_values("a").reset_index(drop=True)
      pd.testing.assert_frame_equal(result, expected)
  
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 14 for calling a global function with example usage: test_reset_index_execution(setup) without return types