:param request (bytes):the serialized request
        :param result (FutureResult):

def _future_done_callback(self, request, result):
        """
        :param request (bytes):the serialized request
        :param result (FutureResult):
        """
        self._in_process_transactions_count.dec()
        req = processor_pb2.TpProcessRequest()
        req.ParseFromString(request)
        response = processor_pb2.TpProcessResponse()
        response.ParseFromString(result.content)

        processor_type = ProcessorType(
            req.header.family_name,
            req.header.family_version)

        self._processor_manager[processor_type].get_processor(
            result.connection_id).dec_occupancy()
        self._processor_manager.notify()

        self._get_tp_process_response_counter(
            response.Status.Name(response.status)).inc()

        if result.connection_id in self._open_futures and \
                req.signature in self._open_futures[result.connection_id]:
            del self._open_futures[result.connection_id][req.signature]

        if response.status == processor_pb2.TpProcessResponse.OK:
            state_sets, state_deletes, events, data = \
                self._context_manager.get_execution_results(req.context_id)

            state_changes = [
                transaction_receipt_pb2.StateChange(
                    address=addr,
                    value=value,
                    type=transaction_receipt_pb2.StateChange.SET)
                for addr, value in state_sets.items()
            ] + [
                transaction_receipt_pb2.StateChange(
                    address=addr,
                    type=transaction_receipt_pb2.StateChange.DELETE)
                for addr in state_deletes
            ]

            self._scheduler.set_transaction_execution_result(
                txn_signature=req.signature,
                is_valid=True,
                context_id=req.context_id,
                state_changes=state_changes,
                events=events,
                data=data)

        elif response.status == processor_pb2.TpProcessResponse.INTERNAL_ERROR:
            LOGGER.error(
                "Transaction processor internal error: %s "
                "(transaction: %s, name: %s, version: %s)",
                response.message,
                req.signature,
                req.header.family_name,
                req.header.family_version)

            # Make sure that the transaction wasn't unscheduled in the interim
            if self._scheduler.is_transaction_in_schedule(req.signature):
                self._execute(
                    processor_type=processor_type,
                    content=request,
                    signature=req.signature)

        else:
            self._context_manager.delete_contexts(
                context_id_list=[req.context_id])

            self._fail_transaction(
                txn_signature=req.signature,
                context_id=req.context_id,
                error_message=response.message,
                error_data=response.extended_data)