

def _auth_return_future(f):
    "Similar to tornado.concurrent.return_future, but uses the auth\n    module's legacy callback interface.\n\n    Note that when using this decorator the ``callback`` parameter\n    inside the function will actually be a future.\n    "
    replacer = ArgReplacer(replacer, 'callback')

    @functools.wraps(f)
    def wrapper(*args, **kwargs):
        future = Future()
        (callback, args, kwargs) = replacer.replace(future, args, kwargs)
        if (callback is not None):
            future.add_done_callback(functools.partial(_auth_future_to_callback, callback))
        f(*args, **kwargs)
        return future
    return wrapper

dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/auth.py _auth_return_future/VarMisuse@16/103 `f`->`replacer`