Set the addresses's value unless the future has been declared
        read only.

        Args:
            result (bytes): The value at an address.
            from_tree (bool): Whether the value is being set by a read from
                the merkle tree.

        Returns:
            None

def set_result(self, result, from_tree=False):
        """Set the addresses's value unless the future has been declared
        read only.

        Args:
            result (bytes): The value at an address.
            from_tree (bool): Whether the value is being set by a read from
                the merkle tree.

        Returns:
            None
        """

        if self._read_only:
            if not from_tree:
                LOGGER.warning("Tried to set address %s on a"
                               " read-only context.",
                               self.address)
            return

        with self._condition:
            if self._read_only:
                if not from_tree:
                    LOGGER.warning("Tried to set address %s on a"
                                   " read-only context.",
                                   self.address)
                return
            if from_tree:
                # If the result has not been set in the context, overwrite the
                # value with the value from the merkle tree. Otherwise, do
                # nothing.
                if not self._result_set_in_context:
                    self._result = result
                    self._tree_has_set = True
            else:
                self._result = result
                self._result_set_in_context = True
                self._deleted = False

            self._condition.notify_all()