code: def test_builder_to_backend_smoke_iOS16(
      self, compute_unit, backend, align_corners, half_pixel_centers
  ):
      if align_corners and half_pixel_centers:
          pytest.skip(
              "Invalid configuration of align_corners and half_pixel_centers"
          )
  
      x = np.array([1, 2], dtype=np.float32).reshape(1, 1, 1, 2)
      input_placeholder_dict = {"x": mb.placeholder(shape=x.shape)}
      input_value_dict = {"x": x}
  
      def build_upsample_bilinear(x):
          return mb.upsample_bilinear(
              x=x,
              scale_factor_height=2,
              scale_factor_width=3,
              align_corners=align_corners,
              half_pixel_centers=half_pixel_centers,
          )
  
      expected_output_type = (1, 1, 2, 6, types.fp32)
  
      if half_pixel_centers is None:
          half_pixel_centers = not align_corners
  
      if align_corners and not half_pixel_centers:
          expected_output = [
              1.0,
              1.2,
              1.4,
              1.6,
              1.8,
              2.0,
              1.0,
              1.2,
              1.4,
              1.6,
              1.8,
              2.0,
          ]
      elif not align_corners and half_pixel_centers:
          expected_output = [
              1.0,
              1.0,
              1.33334,
              1.66667,
              2.0,
              2.0,
              1.0,
              1.0,
              1.33334,
              1.66667,
              2.0,
              2.0,
          ]
      elif not align_corners and not half_pixel_centers:
          expected_output = [
              1.0,
              1.33334,
              1.66667,
              2.0,
              2.0,
              2.0,
              1.0,
              1.33334,
              1.66667,
              2.0,
              2.0,
              2.0,
          ]
      else:
          raise ValueError(
              "align_corners and half_pixel_centers cannot be both True"
          )
  
      expected_output = [
          np.array(expected_output, dtype=np.float32).reshape(
              1, 1, 2, 6
          )
      ]
  
      run_compare_builder(
          build_upsample_bilinear,
          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 TestUpsampleBilinear obj's underlying member method code with example usage: obj.test_builder_to_backend_smoke_iOS16(compute_unit, backend, align_corners, half_pixel_centers) and returns: mb