class_docstr: Input graph:
  input -----> transpose(axis=[1,0]) -----> transpose(axis=[1,0]) ---> out
  
  Output graph:
  input -----> identity -----> out
class_docstr_tok: ["Input","graph",":","input","--","--","-",">","transpose","(","axis=","[","1,0","]",")","--","--","-",">","transpose","(","axis=","[","1,0","]",")","--","-",">","out","Output","graph",":","input","--","--","-",">","identity","--","--","-",">","out"]
code: def test_residual_with_unmaterialized_multiple_output(self):
      @mb.program(input_specs=[mb.TensorSpec(shape=(2, 5))])
      def prog(x):
          x1 = mb.transpose(x=x, perm=[1, 0])
          t1 = mb.transpose(x=x1, perm=[1, 0])
          x2 = mb.reduce_mean(x=t1, axes=[1], keep_dims=True)
          t2 = mb.transpose(x=x2, perm=[1, 0])
          out1 = mb.add(x=x1, y=t2)
          out2 = mb.relu(x=out1)
          return out1, out2
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::reduce_transposes"
      )
      self.assertEqual(
          get_op_types_in_program(prev_prog),
          [
              "transpose",
              "transpose",
              "reduce_mean",
              "transpose",
              "add",
              "relu",
          ],
      )
      self.assertEqual(
          get_op_types_in_program(prog),
          ["reduce_mean", "add", "relu", "transpose", "transpose"],
      )
  
      assert_model_is_valid(
          prog,
          {"x": (2, 5)},
          expected_output_shapes={
              block.outputs[0].name: (5, 2),
              block.outputs[1].name: (5, 2),
          },
      )
  
imports: import unittest
  import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import get_new_symbol
  from coremltools.converters.mil.mil.passes.defs.optimize_repeat_ops import TransformAxisUpdateOps
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools.converters.mil.testing_utils import apply_pass_and_basic_check, assert_model_is_valid, get_op_types_in_program
label_desc: Use image node_id 35 for calling the TransposeOptimizationPass obj's underlying member method code with example usage: obj.test_residual_with_unmaterialized_multiple_output() and returns: out1,  out2