def test_double_alias(self, test_name="double_alias"):
        """
        Case: Two outputs are a view of the same tensor.
        Graph: ( gelu ) <--view-- ( output_0 )
                        <--view-- ( output_1 )
        """
        # AIT, two outputs.
        x = gen_input_tensor(shape=self.SHAPE, name="input_x")
        gelu = ops.elementwise(FuncEnum.GELU)(x)  # has an output alias
        output0 = ops.unsqueeze(dim=0)(gelu)
        output0._attrs["is_output"] = True
        output0._attrs["name"] = "output_0"

        output1 = ops.flatten()(gelu)
        output1._attrs["is_output"] = True
        output1._attrs["name"] = "output_1"

        compile_model(
            [output0, output1],
            detect_target(),
            self.WORKDIR,
            test_name,
            do_optimize_graph=False,
        )

        expected_codegen = (
            set_value("param_names_[1]", '"output_0"'),
            set_value("param_names_[2]", '"output_1"'),
        )
        self._assert_codegen_exists(
            test_name, expected_codegen, self.MODEL_CONTAINER_FILE
        )

        view = output0._attrs["is_view_of"]
        view_name = view._attrs["name"]
        expected_codegen = (
            set_value("output_0", view_name),
            set_value("output_1", view_name),
        )
        self._assert_codegen_exists(
            test_name, expected_codegen, self.MODEL_GENERATED_FILE
        )

        Case: Two outputs are a view of the same tensor.
        Graph: ( gelu ) <--view-- ( output_0 )
                        <--view-- ( output_1 )
        
tests/unittest/backend/test_codegen_output_tensor.py