def _definition_equivalent_to_call(definition, call):
if definition.kwargs:<EOL><INDENT>same_kw_variadics = definition.kwargs in call.starred_kws<EOL><DEDENT>else:<EOL><INDENT>same_kw_variadics = not call.starred_kws<EOL><DEDENT>if definition.varargs:<EOL><INDENT>same_args_variadics = definition.varargs in call.starred_args<EOL><DEDENT>else:<EOL><INDENT>same_args_variadics = not call.starred_args<EOL><DEDENT>same_kwonlyargs = all(kw in call.kws for kw in definition.kwonlyargs)<EOL>same_args = definition.args == call.args<EOL>no_additional_kwarg_arguments = True<EOL>if call.kws:<EOL><INDENT>for keyword in call.kws:<EOL><INDENT>is_arg = keyword in call.args<EOL>is_kwonly = keyword in definition.kwonlyargs<EOL>if not is_arg and not is_kwonly:<EOL><INDENT>no_additional_kwarg_arguments = False<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return all(<EOL>(<EOL>same_args,<EOL>same_kwonlyargs,<EOL>same_args_variadics,<EOL>same_kw_variadics,<EOL>no_additional_kwarg_arguments,<EOL>)<EOL>)<EOL>
Check if a definition signature is equivalent to a call.