def test_empty():
        """
        Case where the input var is also a block output.
        """
        # case 1
        @mb.program(input_specs=[mb.TensorSpec(shape=(2, 3))])
        def prog(x):
            return x

        graph_pass = add_fp16_cast()
        block = prog.functions["main"]
        graph_pass.transform_function_signatures(block)
        apply_pass_and_basic_check(prog, "common::dead_code_elimination")

        assert get_op_types_in_program(prog) == []
        assert block.inputs["x"].dtype == types.fp16
        assert len(block.outputs) == 1
        assert block.outputs[0].dtype == types.fp16
        assert block.outputs[0] is block.inputs["x"]

        # case 2
        @mb.program(input_specs=[mb.TensorSpec(shape=(2, 3))])
        def prog(x):
            return x, mb.relu(x=x), x, x

        graph_pass = add_fp16_cast()
        block = prog.functions["main"]
        graph_pass.transform_function_signatures(block)

        assert block.inputs["x"].dtype == types.fp16
        assert len(block.outputs) == 4

        assert block.outputs[0].dtype == types.fp16
        assert block.outputs[2].dtype == types.fp16
        assert block.outputs[3].dtype == types.fp16

        assert block.outputs[1].dtype == types.fp32

        assert block.outputs[0] is block.inputs["x"]
        assert block.outputs[2] is block.inputs["x"]
        assert block.outputs[3] is block.inputs["x"]

        assert all(x.dtype == types.fp16 for x in block.output_types)

        assert get_op_types_in_program(prog) == ["cast", "relu"]
        cast_op = block.find_ops(op_type="cast")[0]
        assert cast_op.dtype.val == "fp32"

        Case where the input var is also a block output.
        
coremltools/converters/mil/mil/passes/tests/test_quantization_passes.py