code: def _process_redirect(self):
          '''Update the Redirect Tracker.'''
          _logger.debug('Handling redirect.')
  
          if self._redirect_tracker.exceeded():
              raise ProtocolError('Too many redirects.')
  
          try:
              url = self._redirect_tracker.next_location()
  
              if not url:
                  raise ProtocolError('Redirect location missing.')
  
              if self._redirect_tracker.is_repeat():
                  _logger.debug('Got redirect is repeat.')
  
                  request = self._original_request.copy()
                  request.url = url
              else:
                  request = self._request_factory(url)
  
              request.prepare_for_send()
          except ValueError as error:
              raise ProtocolError('Invalid redirect location.') from error
  
          self._next_request = request
  
          _logger.debug('Updated next redirect request to {0}.'.format(request)f _process_redirect(self):
          '''Update the Redirect Tracker.'''
          _logger.debug('Handling redirect.')
  
          if self._redirect_tracker.exceeded():
              raise ProtocolError('Too many redirects.')
  
          try:
              url = self._redirect_tracker.next_location()
  
              if not url:
                  raise ProtocolError('Redirect location missing.')
  
              if self._redirect_tracker.is_repeat():
                  _logger.debug('Got redirect is repeat.')
  
                  request = self._original_request.copy()
                  request.url = url
              else:
                  request = self._request_factory(url)
  
              request.prepare_for_send()
          except ValueError as error:
              raise ProtocolError('Invalid redirect location.') from error
  
          self._next_request = request
  
          _logger.debug('Updated next redirect request to {0}.'.format(request))
docs: Update the Redirect Tracker.