code: def test_index(setup):
      with option_context({"eager_mode": True}):
          a = mt.random.rand(10, 5, chunk_size=5)
          idx = slice(0, 5), slice(0, 5)
          a[idx] = 1
          np.testing.assert_array_equal(a.fetch()[idx], np.ones((5, 5)))
  
          split1, split2 = mt.split(a, 2)
          np.testing.assert_array_equal(split1.fetch(), np.ones((5, 5)))
  
          # test bool indexing
          a = mt.random.rand(8, 8, chunk_size=4)
          set_value = mt.ones((2, 2)) * 2
          a[4:6, 4:6] = set_value
          b = a[a > 1]
          assert b.shape == (4,)
          np.testing.assert_array_equal(b.fetch(), np.ones((4,)) * 2)
  
          c = b.reshape((2, 2))
          assert c.shape == (2, 2)
          np.testing.assert_array_equal(c.fetch(), np.ones((2, 2)) * 2)
  
file_path: mars/mars/tests/test_eager_mode.py
imports: import numpy
  import pandas
  import pytest
  from ..None import tensor
  from ..None import dataframe
  from ..config import option_context
  from ..dataframe.datasource.dataframe import from_pandas
label_desc: Use image node_id 4 for calling a global function with example usage: test_index(setup) without return types