def _build_publish_data(topic, qos, retain):
 data = {ATTR_TOPIC: topic}
 if (qos is not None):
  data[ATTR_QOS] = qos
 if (retain is not None):
  data[ATTR_RETAIN] = retain
 return data

def _build_publish_data ( topic , qos , retain ) : data = { ATTR_TOPIC : topic } if ( qos is not None ) : data [ ATTR_QOS ] = qos if ( retain is not None ) : data [ ATTR_RETAIN ] = retain return data
build the arguments for the publish service without the payload .