code: def _maybe_location(cls, response, uri=None):
          
          location = response.headers.getRawHeaders(b'location', [None])[0]
          if location is not None:
              return location.decode('ascii')
          return uri
docs: Get the Location: if there is one.