def introspect_and_call(func, settings):
    a, k, _, _ = getargspec(func)

    try:
        # get the current values of each input to the UDF
        a = [settings(item) for item in a]
    except MissingSettingError as exc:
        # the UDF expects an argument that we don't know how to provide
        # try to give a helpful error message
        missing = exc.args[0]
        setting_list = "\n -".join(settings.setting_names())
        raise MissingSettingError("This custom viewer is trying to use an "
                                  "unrecognized variable named %s\n. Valid "
                                  "variable names are\n -%s" %
                                  (missing, setting_list))
    k = k or {}

    return func(*a, **k)
Decorator that sets up for OAuth 2.0 dance, but doesn't do it.
dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py/introspect_and_call--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/google-api-python-client/oauth2client/appengine.py/OAuth2Decorator.oauth_aware