I think @dreid was talking about putting everything except the func, *args and **kwargs inside lock object (including max_retry) when creating the object. This way `with_lock` only takes func and it args