human
Complete the below
def filter_kwargs(f, kwargs):

    ''''Return a dict of valid kwargs for `f` from a subset of `kwargs`
    Examples
    >>> def f(a, b=1, c=2):
    ...     return a + b + c
    >>> raw_kwargs = dict(a=1, b=3, d=4)
    >>> f(**raw_kwargs)
    Traceback (most recent call last):
    TypeError: f() got an unexpected keyword argument \'d\'
    >>> kwargs = filter_kwargs(f, raw_kwargs)
    >>> f(**kwargs)
    6
    Notes
    Taken from odo.utils'
    '''

What is a the Python code you requested?
assistant
#Here is the Python code you requested.
    return keyfilter(op.contains(keywords(f)), kwargs)