<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_transaction( self, transaction: BaseOrSpoofTransaction) -> 'BaseComputation': """ Apply transaction to the vm state :param transaction: the transaction to apply :return: the computation """

        if self.state_root != BLANK_ROOT_HASH and not self._account_db.has_root(self.state_root):
            raise StateRootNotFound(self.state_root)
        else:
            return self.execute_transaction(transaction)