def num_mock_patch_args(function):
patchings = getattr(function, "<STR_LIT>", None)<EOL>if not patchings:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>mock_modules = [sys.modules.get("<STR_LIT>"), sys.modules.get("<STR_LIT>")]<EOL>if any(mock_modules):<EOL><INDENT>sentinels = [m.DEFAULT for m in mock_modules if m is not None]<EOL>return len(<EOL>[p for p in patchings if not p.attribute_name and p.new in sentinels]<EOL>)<EOL><DEDENT>return len(patchings)<EOL>
return number of arguments used up by mock arguments (if any)