code: def publish_multiple(self, msgs, hostname="localhost", port=1883,
              client_id="", keepalive=60, will=None, auth=None,
              tls=None, protocol=mqtt.MQTTv31):
  
          
          logger.info('Publishing to: %s:%s, msgs: %s' %
                      (hostname, port, msgs))
          publish.multiple(msgs, hostname, port, client_id, keepalive,
                          will, auth, tls, protocol)
docs: Publish multiple messages and disconnect. This keyword uses the
          [http://eclipse.org/paho/clients/python/docs/#multiple|multiple]
          function of publish module.
  
          `msgs` a list of messages to publish. Each message is either a dict
                  or a tuple. If a dict, it must be of the form:
                  msg = {'topic':"<topic>", 'payload':"<payload>", 'qos':<qos>,
                          'retain':<retain>}
                  Only the topic must be present. Default values will be used
                  for any missing arguments. If a tuple, then it must be of the
                  form:
                  ("<topic>", "<payload>", qos, retain)
  
                  See `publish single` for the description of hostname, port,
                  client_id, keepalive, will, auth, tls, protocol.
  
          Example:
  
          | ${msg1} | Create Dictionary | topic=${topic} | payload=message 1 |
          | ${msg2} | Create Dictionary | topic=${topic} | payload=message 2 |
          | ${msg3} | Create Dictionary | topic=${topic} | payload=message 3 |
          | @{msgs} | Create List | ${msg1} | ${msg2} | ${msg3} |
          | Publish Multiple | msgs=${msgs} | hostname=127.0.0.1 |