def args_from_config(func):
    func_args = signature(func).parameters

    @wraps(func)
    def wrapper(*args, **kwargs):
        config = get_config()
        for i, argname in enumerate(func_args):
            if len(args) > i or argname in kwargs:
                continue
            elif argname in config:
                kwargs[argname] = config[argname]
        try:
            getcallargs(func, *args, **kwargs)
        except TypeError as exc:
            msg = "{}\n{}".format(exc.args[0], PALLADIUM_CONFIG_ERROR)
            exc.args = (msg,)
            raise exc
        return func(*args, **kwargs)

    wrapper.__wrapped__ = func
    return wrapper
Class for initializing search service web handler.
dataset/ETHPy150Open ottogroup/palladium/palladium/util.py/args_from_config--crossover with--dataset/ETHPy150Open AppScale/appscale/SearchService/search_server.py/MainHandler.initialize