docstr: For iOS16+ the crop_resize op supports pad_value.
docstr_tok: ["For","iOS16+","the","crop_resize","op","supports","pad_value","."]
code: def test_builder_to_backend_ios16(
      self, compute_unit, backend, pad_value
  ):
      """For iOS16+ the crop_resize op supports pad_value."""
      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)
  
      roi = np.array(
          [
              [0, 0.1, 0.3, 1.3, 1],
              [0, 0.5, 1.8, 1.0, 0.3],
              [0, 0.0, 0.4, 0.6, 0.7],
          ],
          dtype=np.float32,
      ).reshape(3, 1, 5, 1, 1)
  
      def build(x):
          return mb.crop_resize(
              x=x,
              roi=roi,
              target_width=2,
              target_height=2,
              normalized_coordinates=True,
              box_coordinate_mode="CORNERS_HEIGHT_FIRST",
              sampling_mode="ALIGN_CORNERS",
              pad_value=pad_value,
          )
  
      expected_output_type = [
          (3, 1, 1, 2, 2, types.fp32),
      ]
      expected_output = [
          np.array(
              [
                  3.1,
                  5.2,
                  pad_value,
                  pad_value,
                  pad_value,
                  7.899,
                  pad_value,
                  13.9,
                  2.2,
                  3.1,
                  9.4,
                  10.3,
              ],
              dtype=np.float32,
          ).reshape(3, 1, 1, 2, 2),
      ]
  
      input_placeholder_dict = {"x": mb.placeholder(shape=(1, 1, 4, 4))}
      input_value_dict = {"x": x}
  
      run_compare_builder(
          build,
          input_placeholder_dict,
          input_value_dict,
          expected_output_type,
          expected_output,
          compute_unit=compute_unit,
          backend=backend,
      )
  
file_path: coremltools/coremltools/converters/mil/mil/ops/tests/iOS16/test_image_resizing.py
imports: import itertools
  import numpy
  import pytest
  import coremltools
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import types
  from coremltools.converters.mil.mil.ops.tests.iOS15.test_image_resizing import TestResample
  from coremltools.converters.mil.mil.ops.tests.iOS16 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
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_ios16(compute_unit, backend, pad_value) and returns: mb