def _build_kwargs(keys, input_dict):
kwargs = {}<EOL>for key in keys:<EOL><INDENT>try:<EOL><INDENT>kwargs[key] = input_dict[key]<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>return kwargs<EOL>
Parameters
----------
keys : iterable
    Typically a list of strings.
adict : dict-like
    A dictionary from which to attempt to pull each key.

Returns
-------
kwargs : dict
    A dictionary with only the keys that were in input_dict