def _check_for_default_values(fname, arg_val_dict, compat_args):
for key in arg_val_dict:<EOL><INDENT>try:<EOL><INDENT>v1 = arg_val_dict[key]<EOL>v2 = compat_args[key]<EOL>if (v1 is not None and v2 is None) or(v1 is None and v2 is not None):<EOL><INDENT>match = False<EOL><DEDENT>else:<EOL><INDENT>match = (v1 == v2)<EOL><DEDENT>if not is_bool(match):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>match = (arg_val_dict[key] is compat_args[key])<EOL><DEDENT>if not match:<EOL><INDENT>raise ValueError(("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".<EOL>format(fname=fname, arg=key)))<EOL><DEDENT><DEDENT>
Check that the keys in `arg_val_dict` are mapped to their
default values as specified in `compat_args`.

Note that this function is to be called only when it has been
checked that arg_val_dict.keys() is a subset of compat_args