code: def prepare_message(self, message_data, delivery_mode, priority=None,
              content_type=None, content_encoding=None):
          
          properties = pika.BasicProperties(priority=priority,
                                            content_type=content_type,
                                            content_encoding=content_encoding,
                                            delivery_mode=delivery_mode)
          return message_data, properties
docs: Encapsulate data into a AMQP message.