code: 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)]f 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)])
docs: Yield a reduced set of kwargs of only the valid keyword arguments for the function / constructor f