def _create_argument_value_pairs(func, *args, **kwargs):
<EOL>try:<EOL><INDENT>arg_dict = signature(func).bind_partial(*args, **kwargs).arguments<EOL><DEDENT>except TypeError:<EOL><INDENT>return dict()<EOL><DEDENT>arguments = signature(func).parameters<EOL>for arg_name in arguments:<EOL><INDENT>if (arguments[arg_name].default != Parameter.empty) and (<EOL>arguments[arg_name].name not in arg_dict<EOL>):<EOL><INDENT>arg_dict[arguments[arg_name].name] = arguments[arg_name].default<EOL><DEDENT><DEDENT>return arg_dict<EOL>
Create dictionary with argument names as keys and their passed values as values.

An empty dictionary is returned if an error is detected, such as more
arguments than in the function definition, argument(s) defined by position
and keyword, etc.