<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fixup_state(self, from_str, state):
 """Fixup state after retart. Fixup the state, if Delete is called when create SM is half-way through. """

        result = self.get_local_final_result()
        if from_str == fw_const.FW_CR_OP:
            if result == fw_const.RESULT_FW_DELETE_INIT:
                return state + 1
        if from_str == fw_const.FW_DEL_OP:
            if result == fw_const.RESULT_FW_CREATE_INIT:
                return state - 1
        return state