def test_filter_dict_by_key_set():
    '\n    Test that filter_dict_by_key_set returns a dict with only the given keys\n    '
    d = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
    assert (filter_dict_by_key_set(d, {'a', 'c'}) == {'a': 1, 'c': 3})
    assert (filter_dict_by_key_set(d, {'a', 'c', 'nonsense'}) == {'a': 1, 'c': 3})
    assert (filter_dict_by_key_set(d, {'nonsense'}) == {})
Test that filter_dict_by_key_set returns a dict with only the given keys
def test_filter_dict_by_key_set():
    '\n    \n    '
    d = {'a': 1, 'b': 2, 'c': 3, 'd': 4}
    assert (filter_dict_by_key_set(d, {'a', 'c'}) == {'a': 1, 'c': 3})
    assert (filter_dict_by_key_set(d, {'a', 'c', 'nonsense'}) == {'a': 1, 'c': 3})
    assert (filter_dict_by_key_set(d, {'nonsense'}) == {})