code: def test_series_getitem(setup):
      data = pd.Series(np.random.rand(10))
      series = md.Series(data)
      assert series[1].execute().fetch() == data[1]
  
      data = pd.Series(np.random.rand(10), name="a")
      series = md.Series(data, chunk_size=4)
  
      for i in range(10):
          series1 = series[i]
          assert series1.execute().fetch() == data[i]
  
      series2 = series[[0, 1, 2, 3, 4]]
      pd.testing.assert_series_equal(
          series2.execute().fetch(), data[[0, 1, 2, 3, 4]]
      )
  
      series3 = series[[4, 3, 2, 1, 0]]
      pd.testing.assert_series_equal(
          series3.execute().fetch(), data[[4, 3, 2, 1, 0]]
      )
  
      series4 = series[[1, 2, 3, 2, 1, 0]]
      pd.testing.assert_series_equal(
          series4.execute().fetch(), data[[1, 2, 3, 2, 1, 0]]
      )
      #
      index = ["i" + str(i) for i in range(20)]
      data = pd.Series(np.random.rand(20), index=index, name="a")
      series = md.Series(data, chunk_size=3)
  
      for idx in index:
          series1 = series[idx]
          assert series1.execute().fetch() == data[idx]
  
      selected = ["i1", "i2", "i3", "i4", "i5"]
      series2 = series[selected]
      pd.testing.assert_series_equal(
          series2.execute().fetch(), data[selected]
      )
  
      selected = ["i4", "i7", "i0", "i1", "i5"]
      series3 = series[selected]
      pd.testing.assert_series_equal(
          series3.execute().fetch(), data[selected]
      )
  
      selected = ["i0", "i1", "i5", "i4", "i0", "i1"]
      series4 = series[selected]
      pd.testing.assert_series_equal(
          series4.execute().fetch(), data[selected]
      )
  
      selected = ["i0"]
      series5 = series[selected]
      pd.testing.assert_series_equal(
          series5.execute().fetch(), data[selected]
      )
  
      data = pd.Series(np.random.rand(10))
      series = md.Series(data, chunk_size=3)
      selected = series[:2]
      pd.testing.assert_series_equal(
          selected.execute().fetch(), data[:2]
      )
  
      selected = series[2:8:2]
      pd.testing.assert_series_equal(
          selected.execute().fetch(), data[2:8:2]
      )
  
      data = pd.Series(
          np.random.rand(9), index=["c" + str(i) for i in range(9)]
      )
      series = md.Series(data, chunk_size=3)
      selected = series[:"c2"]
      pd.testing.assert_series_equal(
          selected.execute().fetch(), data[:"c2"]
      )
      selected = series["c2":"c9"]
      pd.testing.assert_series_equal(
          selected.execute().fetch(), data["c2":"c9"]
      )
  
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 8 for calling a global function with example usage: test_series_getitem(setup) without return types