Yield a reduced set of kwargs of only the valid keyword arguments for the function / constructor f

def filterKWArgsForFunc(kwargs, f):
    '''Yield a reduced set of kwargs of only the valid keyword arguments for the function / constructor f'''
    return dict([(k, v) for k, v in kwargs.iteritems() if k in _getValidArgList(f)])