code: def test_partial_fusion_0(self):
      @mb.program(input_specs=[mb.TensorSpec(shape=(10, 2, 3, 5))])
      def prog(x):
          x = mb.transpose(x=x, perm=[0, 2, 3, 1])
          x1 = mb.relu(x=x)
          x2 = mb.relu(x=x)
          y1 = mb.avg_pool(
              x=x1,
              kernel_sizes=[1, 1],
              strides=[1, 1],
              pad_type="valid",
          )
          x3 = mb.log(x=x2)
          y2 = mb.transpose(x=x3, perm=[0, 3, 1, 2])
          return y1, y2
  
      prev_prog, prev_block, block = apply_pass_and_basic_check(
          prog, "common::reduce_transposes"
      )
      self.assertEqual(
          get_op_types_in_program(prev_prog),
          ["transpose", "relu", "relu", "avg_pool", "log", "transpose"],
      )
      self.assertEqual(
          get_op_types_in_program(prog),
          ["relu", "relu", "transpose", "avg_pool", "log"],
      )
  
      assert (
          prev_block.inputs["x"]
          == prev_block.find_ops(op_type="transpose")[0].inputs["x"]
      )
      assert (
          block.find_ops(op_type="log")[0].outputs[0]
          == block.outputs[1]
      )
      assert (
          block.find_ops(op_type="transpose")[0].outputs[0]
          == block.find_ops(op_type="avg_pool")[0].inputs["x"]
      )
      assert list(block.find_ops(op_type="transpose")[0].perm.val) == [
          0,
          2,
          3,
          1,
      ]
      assert_model_is_valid(
          prog,
          {"x": (10, 2, 3, 5)},
          expected_output_shapes={
              block.outputs[0].name: (10, 3, 5, 2),
              block.outputs[1].name: (10, 2, 3, 5),
          },
      )
  
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.testing_utils import assert_op_count_match, assert_model_is_valid, get_op_types_in_program, apply_pass_and_basic_check
  import unittest
  import pytest
  import numpy
label_desc: Use image node_id 7 for calling the TransposeOptimizationPass obj's underlying member method code with example usage: obj.test_partial_fusion_0() and returns: y1,  y2