def wrap_to_dict(support_keys=[], **filters):
    def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            return _wrapper_dict(
                func(*args, **kwargs), support_keys, **filters
            )
        return wrapper
    return decorator
Decrator to convert returned object to dict.
dataset/ETHPy150Open openstack/compass-core/compass/db/api/utils.py/wrap_to_dict