code: def modify(self, failed, deliverable, annotations=None):
          
          if self._can_settle_message():
              self._response = errors.MessageModified(
                  failed,
                  deliverable,
                  annotations=annotations,
                  encoding=self._encoding)
              self._settler(self._response)
              self.state = constants.MessageState.ReceivedSettled
              return True
          return False
docs: Send a response disposition to the service to indicate that
          a received message has been modified. If the client is running in PeekLock
          mode, the service will wait on this disposition. Otherwise it will
          be ignored. Returns `True` is message was modified, or `False` if the message
          was already settled.
  
          :param failed: Whether this delivery of this message failed. This does not
           indicate whether subsequence deliveries of this message would also fail.
          :type failed: bool
          :param deliverable: Whether this message will be deliverable to this client
           on subsequent deliveries - i.e. whether delivery is retryable.
          :type deliverable: bool
          :param annotations: Annotations to attach to response.
          :type annotations: dict
          :rtype: bool
          :raises: TypeError if the message is being sent rather than received.