def domain_constructor(**b_kwargs):
    def deco(f):
        def wrapper(*args, **kwargs):
            if 'name' in b_kwargs:
                _b_kwargs = b_kwargs
            else:
                _b_kwargs = dict(b_kwargs, name=f.__name__)
            f_rval = f(*args, **kwargs)
            domain = Domain(lambda x: x, f_rval, **_b_kwargs)
            return domain
        wrapper.__name__ = f.__name__
        return wrapper
    return deco
Decorate a function that returns a pyll expressions so that
dataset/ETHPy150Open hyperopt/hyperopt/hyperopt/tests/test_domains.py/domain_constructor