<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_computation(cls, state: BaseState, message: Message, transaction_context: BaseTransactionContext) -> 'BaseComputation': """ Perform the computation that would be triggered by the VM message. """

        with cls(state, message, transaction_context) as computation:
            # Early exit on pre-compiles
            if message.code_address in computation.precompiles:
                computation.precompiles[message.code_address](computation)
                return computation

            show_debug2 = computation.logger.show_debug2

            for opcode in computation.code:
                opcode_fn = computation.get_opcode_fn(opcode)

                if show_debug2:
                    computation.logger.debug2(
                        "OPCODE: 0x%x (%s) | pc: %s",
                        opcode,
                        opcode_fn.mnemonic,
                        max(0, computation.code.pc - 1),
                    )

                try:
                    opcode_fn(computation=computation)
                except Halt:
                    break
        return computation