def pop_execute_query_kwargs(keyword_arguments):
    """ pop the optional execute query arguments from arbitrary kwargs;
        return non-None query kwargs in a dict
    """
    query_kwargs = {}
    for key in ('transaction', 'isolate', 'pool'):
        val = keyword_arguments.pop(key, None)
        if val is not None:
            query_kwargs[key] = val
    return query_kwargs
