def _check_for_invalid_keys(fname, kwargs, compat_args):
<EOL>diff = set(kwargs) - set(compat_args)<EOL>if diff:<EOL><INDENT>bad_arg = list(diff)[<NUM_LIT:0>]<EOL>raise TypeError(("<STR_LIT>"<EOL>"<STR_LIT>".<EOL>format(fname=fname, arg=bad_arg)))<EOL><DEDENT>
Checks whether 'kwargs' contains any keys that are not
in 'compat_args' and raises a TypeError if there is one.