code: def test_builder_eval(self):
      x_val = np.array(list(range(24))).reshape((2, 3, 4))
      v = [
          mb.slice_by_index(x=x_val, begin=[1, 1, 1], end=[2, 2, 2]),
          mb.slice_by_index(
              x=x_val, begin=[1, 1, 1], end=[2, 3, 4], stride=[1, 1, 2]
          ),
          mb.slice_by_index(
              x=x_val, begin=[-1, -3, -3], end=[-1, -1, -1]
          ),
          mb.slice_by_index(
              x=x_val, begin=[0, 0, -3], end=[-1, -2, -2]
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[-1, -1, -1],
              end=[0, 1, -3],
              stride=[-2, -1, -3],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 1, 1],
              end=[2, 3, 4],
              stride=[1, 1, 2],
              begin_mask=[True, False, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 1, 1],
              end=[2, 3, 4],
              stride=[1, 1, 2],
              begin_mask=[True, False, True],
              end_mask=[True, True, False],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 1, 1],
              end=[2, 3, 4],
              stride=[1, 1, 2],
              begin_mask=[False, False, True],
              end_mask=[True, False, False],
              squeeze_mask=[False, True, False],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 0],
              end=[0, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[True, True, True],
              end_mask=[True, True, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 1, 1],
              end=[2, 2, 0],
              stride=[1, 1, 1],
              squeeze_mask=[False, False, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 0, 0],
              end=[2, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[False, True, True],
              end_mask=[False, True, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 0],
              end=[0, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[True, True, True],
              end_mask=[True, True, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 0, 1],
              end=[2, 0, 2],
              stride=[1, 1, 1],
              begin_mask=[False, True, False],
              end_mask=[False, True, False],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 1],
              end=[0, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[True, True, False],
              end_mask=[True, True, False],
              squeeze_mask=[False, False, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 0],
              end=[0, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[False, False, True],
              end_mask=[False, False, True],
              squeeze_mask=[True, True, False],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 0, 0],
              end=[2, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[False, True, True],
              end_mask=[False, True, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 1, 0],
              end=[2, 2, 0],
              stride=[1, 1, 1],
              begin_mask=[False, False, True],
              end_mask=[False, False, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[1, 0, 0],
              end=[0, 0, 0],
              stride=[1, 1, 1],
              begin_mask=[False, True, True],
              end_mask=[False, True, True],
              squeeze_mask=[True, False, False],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 0],
              end=[0, 0, 0],
              begin_mask=[True, True, True],
              end_mask=[True, True, True],
          ),
          mb.slice_by_index(
              x=x_val,
              begin=[0, 0, 0],
              end=[0, 0, 0],
              stride=[1, 1, -1],
              begin_mask=[True, True, True],
              end_mask=[True, True, True],
          ),
      ]
      ans = [
          x_val[1:2, 1:2, 1:2],
          x_val[1:2, 1:3, 1:4:2],
          x_val[-3:-1, -3:-1, -3:-1],
          x_val[0:-1, 0:-2, -3:-2],
          x_val[-1:0:-2, -1:1:-1, -1:-3:-3],
          x_val[:2, 1:3, :4:2],
          x_val[:, 1:, :4:2],
          x_val[1::1, 1, :3:2],
          x_val[:, :, :],
          x_val[1:2, 1:2, 1],
          x_val[1:2, ...],
          x_val[...],
          x_val[1:2, ..., 1:2],
          x_val[..., 1],
          x_val[0, 0, :],
          x_val[1:2],
          x_val[1:2, 1:2],
          x_val[1],
          x_val[:],
          x_val[..., ::-1],
      ]
      for idx in range(len(v)):
          assert is_close(ans[idx], v[idx].val)
  
imports: from coremltools.converters.mil import testing_reqs
  from coremltools.converters.mil.testing_reqs import *
  from .testing_utils import UNK_SYM, run_compare_builder
label_desc: Use image node_id 2 for calling the TestSliceByIndex obj's underlying member method code with example usage: obj.test_builder_eval() without return types