def handle_401(self, r, **kwargs):
        """Resends a request with auth headers, if needed."""

        www_authenticate = r.headers.get('www-authenticate', '').lower()

        if 'basic' in www_authenticate:
            return self._handle_basic_auth_401(r, kwargs)

        if 'digest' in www_authenticate:
            return self._handle_digest_auth_401(r, kwargs)
dataset/ETHPy150Open sigmavirus24/requests-toolbelt/requests_toolbelt/auth/guess.py/GuessAuth.handle_401/original