def __init__(self, channel, body_value, properties=None,
                 auto_id=False, opinionated=False):
        """Create a new instance of the Message object."""
        super(Message, self).__init__(channel, 'Message')

        # Always have a dict of properties set
        self.properties = properties or {}

        # Assign the body value
        if isinstance(body_value, memoryview):
            self.body = bytes(body_value)
        else:
            self.body = self._auto_serialize(body_value)

        # Add a message id if auto_id is not turned off and it is not set
        if (opinionated or auto_id) and 'message_id' not in self.properties:
            if auto_id:
                raise DeprecationWarning('Use opinionated instead of auto_id')
            self._add_auto_message_id()

        if opinionated:
            if self.properties not in 'timestamp':
                self._add_timestamp()

        # Enforce datetime timestamps
        if 'timestamp' in self.properties:
            self.properties['timestamp'] = \
                self._as_datetime(self.properties['timestamp'])

        # Don't let invalid property keys in
        if self._invalid_properties:
            msg = 'Invalid property: %s' % self._invalid_properties[0]
            raise KeyError(msg)
dataset/ETHPy150Open gmr/rabbitpy/rabbitpy/message.py/Message.__init__/swapped operands of `not in`