def test_ios16_resize_bilinear_dynamic_shape_by_upsample_bilinear(
        self,
        compute_unit,
        backend,
        input_shape,
        scale_factor,
        align_corners,
        half_pixel_centers,
    ):
        """
        Since iOS16, dynamic shape is supported only if the output_shape comes from a pattern of
        ``input_shape * (h_scale, w_scale)``, which will be lowered to `upsample_bilinear` MIL op.
        """
        if backend[0] == "neuralnetwork" or ct.utils._macos_version() < (13, 0):
            pytest.skip("half_pixel_centers only support for iOS16 upsample_bilinear layer")

        if half_pixel_centers and align_corners:
            pytest.skip("half_pixel_centers and align_corners cannot be both True")

        batch_dim, _, _, channel = input_shape
        h_factor, w_factor = scale_factor

        @make_tf_graph([(batch_dim, None, None, channel, tf.float32)])
        def build_model(x):
            input_shape = tf.shape(x)
            target_shape = tf.math.multiply(input_shape[1:3], (h_factor, w_factor))
            return tf.raw_ops.ResizeBilinear(
                images=x,
                size=target_shape,
                half_pixel_centers=half_pixel_centers,
                align_corners=align_corners,
            )

        model, inputs, outputs = build_model
        input_values = [random_gen(input_shape, -1, 1)]
        input_dict = dict(zip(inputs, input_values))
        TensorFlowBaseTest.run_compare_tf(
            model,
            input_dict,
            outputs,
            compute_unit=compute_unit,
            backend=backend,
            minimum_deployment_target=ct.target.iOS16,
        )

        Since iOS16, dynamic shape is supported only if the output_shape comes from a pattern of
        ``input_shape * (h_scale, w_scale)``, which will be lowered to `upsample_bilinear` MIL op.
        
coremltools/converters/mil/frontend/tensorflow/test/test_ops.py