code: def _settle_message(self, message_number, response):
          
          if not response or isinstance(response, errors.MessageAlreadySettled):
              return
          if isinstance(response, errors.MessageAccepted):
              self._receiver.settle_accepted_message(message_number)
          elif isinstance(response, errors.MessageReleased):
              self._receiver.settle_released_message(message_number)
          elif isinstance(response, errors.MessageRejected):
              self._receiver.settle_rejected_message(
                  message_number,
                  response.error_condition,
                  response.error_description)
          elif isinstance(response, errors.MessageModified):
              self._receiver.settle_modified_message(
                  message_number,
                  response.failed,
                  response.undeliverable,
                  response.annotations)
          else:
              raise ValueError("Invalid message response type: {}".format(response))
docs: Send a settle dispostition for a received message.
  
          :param message_number: The delivery number of the message
           to settle.
          :type message_number: int
          :response: The type of disposition to respond with, e.g. whether
           the message was accepted, rejected or abandoned.
          :type response: ~uamqp.errors.MessageResponse