:param keys: A iterable key names to select items
    :param kwargs: A dict or dict-like object reprensents keyword args

    >>> list(filter_kwargs(("a", "b"), dict(a=1, b=2, c=3, d=4)))
    [('a', 1), ('b', 2)]

def filter_kwargs(keys, kwargs):
    """
    :param keys: A iterable key names to select items
    :param kwargs: A dict or dict-like object reprensents keyword args

    >>> list(filter_kwargs(("a", "b"), dict(a=1, b=2, c=3, d=4)))
    [('a', 1), ('b', 2)]
    """
    for k in keys:
        if k in kwargs:
            yield (k, kwargs[k])