parameters: (self, r, **kwargs)
docstring: Reset num_401_calls counter on redirects.
docstring_summary: Reset num_401_calls counter on redirects.
docstring_tokens: Reset num_401_calls counter on redirects .
function: def handle_redirect(self, r, **kwargs):
          """Reset num_401_calls counter on redirects."""
          if r.is_redirect:
              self._thread_local.num_401_calls = 1
function_tokens: def handle_redirect ( self , r , * * kwargs ) : if r . is_redirect : self . _thread_local . num_401_calls = 1