code: def build_publish_packet(self, dup=False):
          
          return PublishPacket.build(self.topic, self.data, self.packet_id, dup, self.qos, self.retain)
docs: Build :class:`hbmqtt.mqtt.publish.PublishPacket` from attributes
  
          :param dup: force dup flag
          :return: :class:`hbmqtt.mqtt.publish.PublishPacket` built from ApplicationMessage instance attributes