def _do_publish(client):
    """Internal function"""
    message = client._userdata.popleft()
    if isinstance(message, dict):
        client.publish(**message)
    elif isinstance(message, (tuple, list)):
        client.publish(*message)
    else:
        raise TypeError('message must be a dict, tuple, or list')
