code: def geturl(self):
          
          if self.retries is not None and len(self.retries.history):
              return self.retries.history[-1].redirect_location
          else:
              return self._request_url
docs: Returns the URL that was the source of this response.
          If the request that generated this response redirected, this method
          will return the final redirect location.