

def introspect_and_call(func, settings):
    "\n    Introspect a function for its arguments, extract values for those\n    arguments from a settings oracle, and call the function\n\n    Parameters\n    ----------\n    func : function\n       A function to call. It should not define any keywords\n    settings : SettingsOracle\n       An oracle to extract values for the arguments func expects\n\n    Returns\n    -------\n    The result of calling func with the proper arguments\n\n    *Example*\n\n    def a(x, y):\n        return x, y\n\n    introspect_and_call(a, settings) will return\n\n    a(settings('x'), settings('y'))\n    "
    (a, k, _, _) = getargspec(func)
    try:
        a = [settings(item) for item in a]
    except MissingSettingError as exc:
        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, **setting_list)

dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py introspect_and_call/VarMisuse@109/388 `k`->`setting_list`