code: def test_builder_to_backend_smoke(self, use_cpu_only, backend):
      x_val = (
          np.array(list(range(24)))
          .reshape((2, 3, 4))
          .astype(np.float32)
      )
      begin_val = np.array([1, 1, 1], dtype=np.int32)
      end_val = np.array([2, 3, 3], dtype=np.int32)
      input_placeholders = {
          "x": mb.placeholder(shape=x_val.shape),
          "begin": mb.placeholder(
              shape=begin_val.shape, dtype=types.int32
          ),
          "end": mb.placeholder(shape=end_val.shape, dtype=types.int32),
      }
      input_values = {"x": x_val, "begin": begin_val, "end": end_val}
  
      def build(x, begin, end):
          begin_c = mb.const(val=begin_val)
          end_c = mb.const(val=end_val)
          return [
              mb.slice_by_index(x=x, begin=begin, end=end),
              mb.slice_by_index(x=x, begin=begin_c, end=end_c),
          ]
  
      expected_output_types = [
          (UNK_SYM, UNK_SYM, UNK_SYM, types.fp32)
      ] * 2
      expected_outputs = [
          np.array([[[17, 18], [21, 22]]], dtype=np.float32)
      ] * 2
      run_compare_builder(
          build,
          input_placeholders,
          input_values,
          expected_output_types,
          expected_outputs,
          use_cpu_only=use_cpu_only,
          frontend_only=False,
          backend=backend,
      )
  
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 1 for calling the TestSliceByIndex obj's underlying member method code with example usage: obj.test_builder_to_backend_smoke(use_cpu_only, backend) and returns: list