code: def test_static_output_shapes(backend):
      @mb.program(
          input_specs=[
              mb.TensorSpec(
                  shape=(2, 3),
              )
          ]
      )
      def prog(x):
          x = mb.add(x=x, y=1.0)
          y = mb.sub(x=x, y=3.0)
          z = mb.reduce_sum(x=x, axes=[0, 1], keep_dims=False)
          return x, y, z
  
      model = ct.convert(prog, convert_to=backend[0])
      spec = model.get_spec()
      expected_output_shape = (
          [2, 3] if backend[0] == "mlprogram" else []
      )
      assert (
          spec.description.output[0].type.multiArrayType.shape
          == expected_output_shape
      )
      assert (
          spec.description.output[1].type.multiArrayType.shape
          == expected_output_shape
      )
      # scalar outputs have shape ()
      assert spec.description.output[2].type.multiArrayType.shape == []
  
      coreml_in = {"x": _np.random.rand(2, 3)}
      model.predict(coreml_in)
  
imports: import itertools
  import os
  import tempfile
  import numpy
  import PIL.Image
  import pytest
  import coremltools
  from coremltools._deps import _HAS_TF_2, _HAS_TORCH, MSG_TF2_NOT_FOUND, MSG_TORCH_NOT_FOUND
  from coremltools.converters.mil import Builder
  from coremltools.converters.mil.testing_reqs import backends, compute_units
label_desc: Use image node_id 1 for calling the TestOutputShapes obj's underlying member method code with example usage: obj.test_static_output_shapes(backend) and returns: x,  y,  z