def test_multiple_states_model(self, float32_two_buffers_model, compute_unit):
        """
        Tests for a model with multiple buffers.
        """
        mlmodel = ct.convert(
            float32_two_buffers_model,
            inputs=[
                ct.TensorType(shape=(3,)),
            ],
            states=[
                ct.StateType(
                    wrapped_type=ct.TensorType(
                        shape=(3,),
                    ),
                    name="state_1",
                ),
                ct.StateType(
                    wrapped_type=ct.TensorType(
                        shape=(3,),
                    ),
                    name="state_2",
                ),
            ],
            minimum_deployment_target=ct.target.iOS18,
            convert_to="mlprogram",
            compute_units=compute_unit,
        )
        prog = mlmodel._mil_program
        assert get_op_types_in_program(prog) == [
            "read_state",
            "sub",
            "read_state",
            "mul",
            "coreml_update_state",
            "mul",
            "coreml_update_state",
            "add",
            "coreml_update_state",
            "add",
        ]
        verify_prediction(mlmodel)

        Tests for a model with multiple buffers.
        
coremltools/converters/mil/frontend/torch/test/test_torch_stateful_model.py