code: def test_builder_to_backend_smoke(
      self, compute_unit, backend, is_symbolic
  ):
      if (
          backend.backend == "mlprogram"
          and compute_unit != ct.ComputeUnit.CPU_ONLY
      ):
          pytest.xfail(
              "rdar://97398582 (TestCropResize failing on mlprogram + GPU)"
          )
      x = np.array(
          [
              [1, 2, 3, 4],
              [5, 6, 7, 8],
              [9, 10, 11, 12],
              [13, 14, 15, 16],
          ],
          dtype=np.float32,
      ).reshape(1, 1, 4, 4)
  
      input_shape = list(x.shape)
      placeholder_input_shape = input_shape
      if is_symbolic:
          # set batch and channel dimension symbolic
          placeholder_input_shape[0] = get_new_symbol()
          placeholder_input_shape[1] = get_new_symbol()
  
      input_placeholder_dict = {
          "x": mb.placeholder(shape=placeholder_input_shape)
      }
      input_value_dict = {"x": x}
      N = 1
      roi = np.array([[1, 1, 2, 2]], dtype=np.float32).reshape(
          1, 1, 4, 1, 1
      )
      roi_normalized = np.array(
          [[0, 0.0, 0.0, 1.0 / 3, 1.0 / 3]], dtype=np.float32
      ).reshape(1, 1, 5, 1, 1)
      roi_invert = np.array([[2, 2, 1, 1]], dtype=np.float32).reshape(
          1, 1, 4, 1, 1
      )
  
      def build(x, mode=0):
          if mode == 0:
              return mb.crop_resize(
                  x=x,
                  roi=roi,
                  target_width=2,
                  target_height=2,
                  normalized_coordinates=False,
                  box_coordinate_mode="CORNERS_HEIGHT_FIRST",
                  sampling_mode="ALIGN_CORNERS",
              )
  
          elif mode == 1:
              return mb.crop_resize(
                  x=x,
                  roi=roi,
                  target_width=4,
                  target_height=4,
                  normalized_coordinates=False,
                  box_coordinate_mode="CORNERS_HEIGHT_FIRST",
                  sampling_mode="ALIGN_CORNERS",
              )
  
          elif mode == 2:
              return mb.crop_resize(
                  x=x,
                  roi=roi,
                  target_width=1,
                  target_height=1,
                  normalized_coordinates=False,
                  box_coordinate_mode="CORNERS_HEIGHT_FIRST",
                  sampling_mode="ALIGN_CORNERS",
              )
  
          elif mode == 3:
              return mb.crop_resize(
                  x=x,
                  roi=roi_normalized,
                  target_width=2,
                  target_height=2,
                  normalized_coordinates=True,
                  box_coordinate_mode="CORNERS_HEIGHT_FIRST",
                  sampling_mode="ALIGN_CORNERS",
              )
  
          elif mode == 4:
              return mb.crop_resize(
                  x=x,
                  roi=roi_invert,
                  target_width=2,
                  target_height=2,
                  normalized_coordinates=False,
                  box_coordinate_mode="CORNERS_HEIGHT_FIRST",
                  sampling_mode="ALIGN_CORNERS",
              )
  
      expected_output_type = [
          (
              N,
              placeholder_input_shape[0],
              placeholder_input_shape[1],
              2,
              2,
              types.fp32,
          ),
          (
              N,
              placeholder_input_shape[0],
              placeholder_input_shape[1],
              4,
              4,
              types.fp32,
          ),
          (
              N,
              placeholder_input_shape[0],
              placeholder_input_shape[1],
              1,
              1,
              types.fp32,
          ),
          (
              N,
              placeholder_input_shape[0],
              placeholder_input_shape[1],
              2,
              2,
              types.fp32,
          ),
          (
              N,
              placeholder_input_shape[0],
              placeholder_input_shape[1],
              2,
              2,
              types.fp32,
          ),
      ]
      expected_output = [
          np.array([6, 7, 10, 11], dtype=np.float32).reshape(
              1, 1, 1, 2, 2
          ),
          np.array(
              [
                  [6, 6.333333, 6.66666, 7],
                  [7.333333, 7.666666, 8, 8.333333],
                  [8.666666, 9, 9.3333333, 9.666666],
                  [10, 10.333333, 10.666666, 11],
              ],
              dtype=np.float32,
          ).reshape(1, 1, 1, 4, 4),
          np.array([8.5], dtype=np.float32).reshape(1, 1, 1, 1, 1),
          np.array([1, 2, 5, 6], dtype=np.float32).reshape(
              1, 1, 1, 2, 2
          ),
          np.array([11, 10, 7, 6], dtype=np.float32).reshape(
              1, 1, 1, 2, 2
          ),
      ]
  
      for mode in range(5):
          run_compare_builder(
              functools.partial(build, mode=mode),
              input_placeholder_dict,
              input_value_dict,
              expected_output_type[mode],
              expected_output[mode],
              compute_unit=compute_unit,
              backend=backend,
          )
  
imports: import functools
  import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TORCH, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol, types
  from coremltools.converters.mil.mil.ops.tests.iOS14 import backends
  from coremltools.converters.mil.mil.ops.tests.testing_utils import mark_api_breaking, run_compare_builder
  from coremltools.converters.mil.testing_reqs import compute_units
  from coremltools.converters.mil.testing_utils import random_gen
label_desc: Use image node_id 1 for calling the TestCropResize obj's underlying member method code with example usage: obj.test_builder_to_backend_smoke(compute_unit, backend, is_symbolic) and returns: mb, mb, mb, mb, mb