code: def test_duplicate_outputs_add_consuming_block_once():
      """The same consuming block should only be added once."""
  
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(2, 4)),
              mb.TensorSpec(shape=(2, 4)),
          ]
      )
      def prog(x0, y0):
          x1 = mb.add(x=x0, y=y0)
          return x1, x1, x1
  
      block = prog.functions["main"]
      assert len(block.outputs[0].consuming_blocks) == 1
      assert len(block.outputs[1].consuming_blocks) == 1
      assert len(block.outputs[2].consuming_blocks) == 1
  
imports: import copy
  import numpy
  import pytest
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.passes.tests.test_passes import CONSTEXPR_FUNCS
  from coremltools.converters.mil.testing_utils import assert_same_output_names, assert_same_output_shapes, get_op_types_in_program
label_desc: Use image node_id 14 for calling a global function with example usage: test_duplicate_outputs_add_consuming_block_once() and returns: x1,  x1,  x1