code: def test_remove_vacuous_cond():
      @mb.program(
          input_specs=[
              mb.TensorSpec(shape=(1,), dtype=types.bool),
              mb.TensorSpec(shape=(2, 3)),
          ]
      )
      def prog(a, b):
          def then_branch():
              return mb.identity(x=b)
  
          def else_branch():
              return mb.identity(x=b)
  
          pred = mb.squeeze(x=a)
          return mb.cond(
              pred=pred, _true_fn=then_branch, _false_fn=else_branch
          )
  
      cond_op = prog.find_ops(op_type="cond", exactly_one=True)[0]
      original_cond_op_name = cond_op.name
      assert len(cond_op.blocks[0].operations) == 1
      assert len(cond_op.blocks[1].operations) == 1
      assert cond_op.blocks[0].operations[0].op_type == "identity"
      assert cond_op.blocks[1].operations[0].op_type == "identity"
  
      prev_prog = copy.deepcopy(prog)
      PASS_REGISTRY["tensorflow2::remove_vacuous_cond"](prog)
      assert_same_output_names(prev_prog, prog)
  
      cond_op = prog.find_ops(op_type="cond")
      assert len(cond_op) == 0
      identity_op = prog.find_ops(
          prefix=original_cond_op_name, exactly_one=True
      )[0]
      assert identity_op.op_type == "identity"
  
      if validate_model:
          assert_model_is_valid(prog, {"a": (1,), "b": (2, 3)})
  
imports: from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.testing_utils import assert_op_count_match, assert_model_is_valid, assert_same_output_names
  from coremltools.converters.mil.mil.passes.pass_registry import PASS_REGISTRY
  from coremltools.converters.mil.mil import types
  import copy
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: test_remove_vacuous_cond() and returns: mb, mb, mb