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