code: def test_slicebyindex_full_elimination():
      @mb.program(input_specs=[mb.TensorSpec(shape=(2, 4))])
      def prog(x):
          r1 = mb.slice_by_index(x=x, begin=[0, 0], end=[2, 4])
          return mb.relu(x=r1)
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::noop_elimination"
      )
      assert get_op_types_in_program(prev_prog) == [
          "slice_by_index",
          "relu",
      ]
      assert get_op_types_in_program(prog) == ["relu"]
      assert_model_is_valid(
          prog,
          {"x": (2, 4)},
          expected_output_shapes={block.outputs[0].name: (2, 4)},
      )
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/mil/passes/test_noop_elimination.py
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.testing_utils import assert_model_is_valid, get_op_types_in_program, apply_pass_and_basic_check
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  import copy
  import pytest
  import itertools
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: test_slicebyindex_full_elimination() and returns: mb